Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a daemonset on all nodes of a kubernetes cluster

Tags:

kubernetes

How can I run a daemonset on all nodes of a kubernetes cluster (including master) without overriding the taints of any nodes?

like image 786
Shane Warne Avatar asked Oct 27 '25 03:10

Shane Warne


2 Answers

If you want to run a daemonset and make sure it will get scheduled onto all nodes in the cluster regardless of taints. For example in a GKE cluster running google’s Stackdriver logging agent the fluentd-gcp daemonset has the following toleration to make sure it gets past any node taint:

tolerations:
-operator: Exists
 effect: NoExecute
-operator: Exists
 effect: NoSchedule

This way you can scheduler the daemonset on the master even if it has NoSchedule taints.

like image 60
Prafull Ladha Avatar answered Oct 30 '25 13:10

Prafull Ladha


in my case it was:

tolerations:
- operator: Exists # matches all keys, values and effects which means this will tolerate everything

An empty key with operator Exists matches all keys, values and effects which means this will tolerate everything.

tolerations:
- operator: "Exists"

From: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#concepts

like image 41
dsaydon Avatar answered Oct 30 '25 13:10

dsaydon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!