Deleting" state.Unknown"This might occur on TKGS or TKGm backing clusters operated by the Cluster API
If the cluster is configured with "paused: true", it will not be operated against. The Paused flag must be removed in order to allow the CAPI controllers to delete the cluster.
To determine if the cluster is paused, use the following command which will return "paused: true" :
kubectl get cluster <CLUSTER_NAME> -n NAMESPACE_NAME -o yaml | grep -i pause
WARNING: This operation is only supported on clusters that are in Deleting state. These steps should not be performed on upgrading clusters.
If these unpause steps are performed on an upgrading or migrating cluster, the cluster may not be recoverable and will need to be redeployed.
Use the following command to remove the "paused: true" flag from the cluster to allow remediation:
kubectl patch cluster <CLUSTER_NAME> -n <NAMESPACE_NAME> --type merge -p '{"spec":{"paused": false}}'
Example:
kubectl patch cluster test-cluster -n test-cluster-namespace --type merge -p '{"spec":{"paused": false}}'