Delete vCluster
- vcluster
- helm
- kubectl
# switch the kube context back
vcluster disconnect
# OR: switch context back and delete vCluster
vcluster delete my-vcluster
helm delete my-vcluster -n vcluster-my-vcluster --repository-config=''
The easiest option to delete a virtual cluster using kubectl
is to delete the host namespace:
kubectl delete namespace vcluster-my-vcluster
In case you have multiple vClusters or any other resources in this namespace, you can also just delete the vCluster-related resources:
kubectl delete -n vcluster-my-vcluster serviceaccount vcluster-1
kubectl delete -n vcluster-my-vcluster role vcluster-1
kubectl delete -n vcluster-my-vcluster rolebinding vcluster-1
kubectl delete -n vcluster-my-vcluster service vcluster-1
kubectl delete -n vcluster-my-vcluster service vcluster-1-headless
kubectl delete -n vcluster-my-vcluster statefulset vcluster-1
Resources inside vClusters
Deleting a vCluster also delete all objects within and all states related to the vCluster.