Junior — Middle
What consequences will arise when setting the number of replicas for DaemonSet to two?
sobes.tech AI
Answer from AI
DaemonSet in Kubernetes is designed to run one pod on each node of the cluster. If you try to set the number of replicas to two, it will have no effect because DaemonSet ignores the replicas parameter.
Consequences:
- Kubernetes will run one pod on each node, regardless of the replicas value.
- If there are two nodes in the cluster, there will be two pods — one on each node.
- If you explicitly set replicas, Kubernetes will simply ignore this field, as it is not supported for DaemonSet.
Thus, setting replicas to two for a DaemonSet will not change the behavior and will not create two pods on the same node.