Dedicated Pods on Autoscaled Kubernetes worker nodes


I have created an autoscaling Kubernetes cluster on Google Cloud Platform. I have a use case where I want to launch dedicated pods on each node .i.e. each worker node can have only one such pod and I want these dedicated pods to be launched on the newly created nodes which were formed due to autoscaling. Is there a way I can achieve this.
for e.g. If I have 3 workers nodes , I will specify number of replicas to be 3 along with podAntiAffinity in my deployment file so that each of these pods will launch on 3 different nodes. But If my cluster autoscales and a 4th node is added, how can I ensure that this Pod will be added on the 4th node?

Is this the right place to post this question, if not then i apologise for that. I have also posted it on StackOverflow. Below is the link -


Yes, asking here is right. I think people use stack overflow too.

Would a daemonset, instead of deployment, work for you?

A daemonset is a pod that gets a scheduled on every node, even if you scale up or down. Seems exactly what you are looking for, if I understand correctly :slight_smile:


Hey, thanks for your reply. I would surely try this out and post my observations. :slight_smile:


Hey, I tried using DaemonSet and it worked for my use case. Thanks!!


Awesome! :slight_smile: