VMware vSphere Kubernetes Service
1. Stop workloads running within the workload cluster.
2. While in the Supervisor cluster context, mark the target cluster as paused. This prevents Cluster API (CAPI) from determining that nodes have failed and triggering remediation when they are powered off.kubectl patch cluster <TARGET_CLUSTER_NAME> -n <NAMESPACE> --type merge -p '{"spec":{"paused":true}}'
Verify that the target cluster is paused:kubectl get cluster <TARGET_CLUSTER_NAME> -n <NAMESPACE> -o yaml | grep -i paused
The Supervisor will now ignore health checks for this workload cluster.
3. Get VM name inside the Workload Cluster:kubectl get vm -n <NAMESPACE> | grep <cluster_name>
Power off VM:kubectl patch virtualmachine <VM_NAME> -n <NAMESPACE> --type merge -p '{"spec":{"powerState": "PoweredOff"}}'
Power on the Workload Cluster:
1. Power On VM:kubectl patch virtualmachine <VM_NAME> -n <NAMESPACE> --type merge -p '{"spec":{"powerState": "PoweredOn"}}'
2. Remove the pause mark on target cluster:kubectl patch cluster <TARGET_CLUSTER_NAME> -n <NAMESPACE> --type merge -p '{"spec":{"paused": false}}'
Verify that the target cluster is not paused:kubectl get cluster <TARGET_CLUSTER_NAME> -n <NAMESPACE> -o yaml | grep -i paused
3. Start workloads running within the workload cluster.