Offboarding namespaces from slice is an easy and straightforward process. This topic describes the steps to offboard namespaces before you delete your slice.
If your application is installed on multiple clusters within a slice, you must complete these steps for each cluster.
Deleting the ServiceExport for Each Application
If a ServiceExport was created in the application namespace, it must be deleted first.
Deleting the ServiceExport removes the corresponding ServiceImport automatically on all the clusters of the slice.
|The name of the cluster the application is deployed on.
|The name of the service export that you want to delete.
|The namespace the application is deployed on.
Switch the contexts to the cluster you deployed the application on:
kubectx <cluster name>
Use the following command to delete the ServiceExport from the cluster:
kubectl delete serviceexport <serviceexport name> -n <application namespace>
Offboarding Namespaces from the Slice Configuration
To offboard the namespace from a slice, delete the
namespace and the associated
clusters under the
applicationNamespaces in the slice configuration file as
- namespace: iperf
- namespace: bookinfo
For example, in the above slice configuration YAML file, if you want to offboard the
Bookinfo namespace from all clusters, edit the slice configuration YAML file and remove it
applicationNamespaces as illustrated below.
- namespace: iperf
To delete a slice, you must remove all the namespaces and the corresponding clusters. So, edit the slice configuration YAML file to remove them. After you remove the namespaces and the corresponding clusters, the application namespace configuration looks as illustrated below.
Apply the slice configuration YAML to update the offboarded namespaces.
kubectl apply -f <slice configuration>.yaml -n <project namespace>
You have successfully offboarded the namespaces from the slice.