Search code examples
kuberneteskubernetes-health-check

kubernetes replicas in a daemonset


I've got logstash running within 5 pods.

I cannot get the command to change the number of pods to 2 to work:

kuberctl scale --replicas=2 daemonset/logstash -n logstash

I have tried variations of it but still no joy.

Could someone tell or point me in the direction?


Solution

  • note that DaemonSet deploys one pod per node. the number of pods would be as many as nodes. you cant control the number of replicas.

    you need to change the object to either Deployment or Statefulset to manage the replica count