https://rancher.com/ logo
#random
Title
# random
r

rough-jordan-89140

11/25/2022, 1:10 PM
Hey all, We would like to add a custom tolerations in cattle-cluster-agent deployment for a user added taint in node, so we are exactly hitting this issue - https://github.com/rancher/rancher/issues/16050 Saw the work around :
Copy code
An empty key with operator Exists matches all keys, values and effects which means this will tolerate everything.
tolerations:
- operator: "Exists"
and
Copy code
kubectl -n cattle-system patch ds/cattle-node-agent -p '{"spec":{"template":{"spec":{"tolerations":[{"operator":"Exists"}]}}}}'
do you think that the first code snippet can be added to the cattle-cluster-agent deployment manifest or it will work only with kubectl patch? We would like to make this persist with code. Please let us know if we really can add a toleration to cattle-cluster-agent deployment manifest, thank you 🙇
a

agreeable-waiter-30020

11/27/2022, 3:14 AM
What version of Rancher are you running? A controller was added to watch the control plane of a downstream cluster and dynamically add tolerations to the agent deployment.
r

rough-jordan-89140

11/27/2022, 3:11 PM
2.6.9 version! We have a taint (own taint or created by ourselves) in a node and want to run agent on that specific nodes. The GitHub issue link which I shjared above has a workaround, is it possible to use that wild card toleration in a deployment manifest or some another way instead of kubectl patch command.
is there a configuration or env variable for setting tolerations manually even though there is a "controller added to watch the control plane of a downstream cluster and dynamically add tolerations to the agent deployment"
a

agreeable-waiter-30020

11/28/2022, 4:42 PM
The cluster agent, with few exceptions, runs on the control plane. Node affinities and tolerations are added to the deployment to achieve this goal. Using a taint/toleration will allow the agent to run on the node you want it to, but it won’t always achieve that goal. Node affinities tell Kubernetes that you want a deployment to run on a specific node. I think that is what you’re after. As far as your question of whether a configuration in Rancher allows you to specify an affinity for the cluster agent, I’m not sure. Digging into Rancher’s helm chart is the only way I know to find this out.
r

rough-jordan-89140

11/29/2022, 10:50 AM
thanks Donnie
7 Views