Currently, it is not possible to taint new nodes in a node pool automatically. Deploy this project in your cluster and it'll watch for new nodes via cronjob.
First modify these three files to fit what your k8s cluster:
cronjob.yaml
- adjust the frequency as you like, it's currently set to run every 15 mins.taint-nodes.sh
- change the node pool names and change the taint to what you need.- Change the namespace in
node-tainter.yaml
to what you need, I usedefault
Then, deploy!
kubectl create -f node-tainter.yaml