Kubernetes - How to create one Pod per Node?

3/12/2019

I want a Kubernetes StatefulSet with:

  • Number of Replicas/Pods = Number of Nodes in Kubernetes Cluster
  • One Pod on on every node

Is there a simple example on how to solve this typical requirement?

-- Simon_Prewo_Frankfurt
kubernetes
kubernetes-statefulset
statefulset

1 Answer

3/12/2019

DaemonSets are exactly what you're looking for. They're a tool which will run a single Pod on every node for your resource. If a new node is created - a new Pod is created on it.

You can find further information onto how they're implemented at the following URL in the documentation:

https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/

-- Neekoy
Source: StackOverflow