Disconnect vs. delete
When you attach a cluster to Kommander that was not created with Kommander, you can later disconnect it. This does not alter the running state of the cluster, but simply removes it from the Kommander UI. User workloads, platform services, and other Kubernetes resources are not cleaned up at detach.
If you created the managed clusters with Kommander, you cannot disconnect the cluster, but you can delete the cluster. This completely removes the cluster and all of its cloud assets.
Statuses
See Statuses for a list of possible states a cluster can have when it is getting disconnected or deleted.
Troubleshooting
I cannot detach an attached cluster that is “Pending”
Sometimes attaching a Kubernetes cluster to Kommander causes that cluster to get stuck in the “Pending” state. This can happen because the wrong kubeconfig
file is used or the cluster is just not reachable by Kommander.
In order to detach the cluster so it does not show in Kommander, follow these steps:
-
Determine the
KommanderCluster
resource backing the cluster you tried to attach. Enter the following command:kubectl -n WORKSPACE_NAMESPACE get kommandercluster
Replace
WORKSPACE_NAMESPACE
with the actual current workspace name. You can find this name by going tohttps://YOUR_CLUSTER_DOMAIN_OR_IP_ADDRESS/dkp/kommander/dashboard/workspaces
in your browser. -
Delete the cluster. Enter the following. command:
kubectl -n WORKSPACE_NAMESPACE delete kommandercluster CLUSTER_NAME
-
If the resource does not go after a short time, remove its finalizers. Enter the following command:
kubectl -n WORKSPACE_NAMESPACE patch kommandercluster CLUSTER_NAME --type json -p '[{"op":"remove", "path":"/metadata/finalizers"}]'
This removes the cluster from the Kommander UI.