1
votes

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?

1
You can use daemonset for this requirement instead of statefulsets. Daemonset provides you a pod on each node. kubernetes.io/docs/concepts/workloads/controllers/daemonset - Prafull Ladha

1 Answers

2
votes

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/