cli icon indicating copy to clipboard operation
cli copied to clipboard

Add taint flag to cluster add-node command

Open mouellet opened this issue 2 years ago • 1 comments

On Rancher's cluster registration page, the one that shows you de node registration command, you have the options (Step 2) to add both node labels and taints. However, the cli cluster add-node command, which also prints the node registration command, only has a flag for node labels.

This Pull Request adds a flag for node taints to the cluster add-node command, printing a node registration command accordingly.

rancher cluster add-node --worker --taint key=value:NoSchedule
sudo docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run  rancher/rancher-agent:v2.6.5 --server https://redacted --token redacted --ca-checksum redacted --worker --taint key=value:NoSchedule

mouellet avatar Jul 07 '22 12:07 mouellet

In light of https://github.com/rancher/rancher/issues/36131, might need to use --taints as flag instead...

mouellet avatar Jul 07 '22 14:07 mouellet