File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ rebuild-cluster: delete-cluster
5555 ./scripts/deploy-calico.sh
5656 ./scripts/preload-images.sh
5757 ./scripts/delete-standard-storageclass.sh
58+ ./scripts/remove-control-plane-taint.sh
5859
5960delete-cluster :
6061 ./scripts/delete-k8s-cluster.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Script to remove the control plane taint from the control-plane nodes
4+
5+ # Get the list of control-plane nodes
6+ CONTROL_PLANE_NODES=$( kubectl get nodes --selector=node-role.kubernetes.io/control-plane -o name)
7+ MASTER_NODES=$( kubectl get nodes --selector=node-role.kubernetes.io/master -o name)
8+
9+ # Remove the control-plane taint from the control-plane nodes
10+ for node in $CONTROL_PLANE_NODES ; do
11+ kubectl taint nodes " $node " node-role.kubernetes.io/control-plane:NoSchedule-
12+ done
13+
14+ # Remove the master taint from the master nodes (deprecated)
15+ for node in $MASTER_NODES ; do
16+ kubectl taint nodes " $node " node-role.kubernetes.io/master:NoSchedule-
17+ done
You can’t perform that action at this time.
0 commit comments