|
This is unreleased documentation for Cluster API v0.26-dev. |
Rancher Cluster Deletion
Prerequisites
-
A CAPI Cluster has been created and imported in Rancher as described in Provision a CAPI Workload Cluster.
Delete the imported cluster from Rancher
The cluster-api.cattle.io/capi-cluster-owner and cluster-api.cattle.io/capi-cluster-owner-ns labels can be used to delete the Rancher Cluster:
kubectl delete clusters.management.cattle.io -l cluster-api.cattle.io/capi-cluster-owner=cluster1 -l cluster-api.cattle.io/capi-cluster-owner-ns=capi-clusters
Once the imported cluster is marked for deletion:
-
Turtles controller will annotate the CAPI cluster with
imported: true. -
This annotation prevents the cluster from being re-imported automatically by Rancher.
-
Verify the annotation using the following command:
kubectl -n capi-clusters get clusters.cluster.x-k8s.io cluster1 -o json | jq .metadata.annotations
{
"imported": "true"
...
}
Deleting the Rancher cluster only removes the clusters.management.cattle.io resource and disables auto-import for the associated CAPI cluster. The underlying CAPI cluster iteself remains intact.
|