Forcefully delete the cluster on Rancher

Forcefully delete the K8S cluster in rancher

Sometimes, we will delete the virtual machine first, and then remember that there is a cluster in rancher that has not been deleted. At this time, if we delete the managed cluster through the rancher interface, we will often get stuck in "Removing the current cluster." ” So how to deal with this situation?

Let's put it into practice together

1. Find the name of the stuck cluster
1. Click the name of the cluster to be deleted, enter the cluster details page, copy the characters after C/ in the URL, for example, my cluster is c-9rhjh
Insert image description here

2. Log in to the server where rancher is deployed and find the stuck cluster.
Enter the command kubectl get clusters.management.cattle.io to see our stuck cluster.

Insert image description here

3. Through the kubectl edit function, set the finalizers field to []
and enter kubectl edit clusters.management.cattle.io c-9rhjh

Insert image description here

After saving, return to the Rancher GUI interface and you will find that the cluster has disappeared.

Supongo que te gusta

Origin blog.csdn.net/qq_39412605/article/details/131512217
Recomendado
Clasificación