Deregistering the Worker Cluster
Introduction
This topic describes the steps to uninstall the Slice Operator, and thereby deregister your cluster from the KubeSlice Controller. The order of these steps is very important to ensure proper resource clean-up. Ensure that you have completed the tasks in the prerequisites.
Prerequisites
Offboard all the namespaces from the slice before deleting it. To know more, see offboarding namespaces.
Delete all the slices from your cluster before deleting the Slice Operator. To know more, see deleting the slice.
Uninstalling the Slice Operator
You must remove the cluster from all the slices it is connected to before uninstalling the Slice Operator in the worker cluster. Failing to do so can result in slices and resources not being cleaned up properly.
After each slice is deleted from the KubeSlice Controller cluster, you can uninstall the slice operator in the worker cluster.
Switch the context to the worker cluster using the following command:
kubectx <cluster name>
Uninstall the Slice Operator using the following command:
helm uninstall [RELEASE_NAME] -n kubeslice-system
Delete the CRDs of the Slice Operator using the following commands:
kubectl delete crd serviceexports.networking.kubeslice.io
kubectl delete crd serviceimports.networking.kubeslice.io
kubectl delete crd slice.networking.kubeslice.io
kubectl delete crd slicegateways.networking.kubeslice.io
Delete the kubeslice-system
namespace using the following command:
kubectl delete ns kubeslice-system
You have now uninstalled the Slice Operator from your registered cluster.
Deregistering your Worker Cluster
After uninstalling the Slice Operator successfully, deregister your worker cluster from the KubeSlice Controller.
Switch the context to the KubeSlice Controller cluster.
kubectx <cluster name>
Deregister a worker cluster using the following command:
kubectl delete clusters <cluster-name> -n kubeslice-<project-name>
To deregister all worker clusters, use the following command:
kubectl delete clusters --all -n kubeslice-<project-name>
You have now successfully deregistered the cluster from the KubeSlice Controller.