Clusters stuck in Removing Phase

Hi,

I have successfully deployed and purged several Kubernetes clusters with Rancher and VMWare vSphere.
However, there is some clusters that is stuck in “Removing” (one says Updating, but it is Removing).
How can I purge these clusters from Rancher?

The nodes was already deleted from VMWare, so I just need to remove the clusters from Rancher itself.

2 Likes

try

Here’s how to manually delete a cluster. Thanks Brad.

kubectl get clusters.management.cattle.io # find the cluster you want to delete
export CLUSTERID=“c-xxxxxxxxx” #
kubectl patch clusters.management.cattle.io $CLUSTERID -p ‘{“metadata”:{“finalizers”:}}’ --type=merge
kubectl delete clusters.management.cattle.io $CLUSTERID
[2.6] Unable to remove cluster · Issue #34650 · rancher/rancher · GitHub

2 Likes

Thanks,
I have not been able to try it because I just purged rancher entirely and reinstalled it.

İf anyone sees this. Solution is here

Hello,
I think you first log in to the Rancher dashboard and attempt a force delete. If that fails, edit the cluster’s YAML configuration to remove references manually. You can also use the Rancher API to send a delete request directly or utilize the Rancher CLI for removal.