Uninstalling Alauda Service Mesh in ambient mode

You can uninstall the Alauda Service Mesh Operator and its ambient mode resources from your Alauda Container Platform. This can be done through the Alauda Container Platform web console or the command line interface (CLI). Additionally, you have the option to delete the Istio custom resource definitions (CRDs).

Uninstalling via the web console

Uninstalling the Alauda Service Mesh v2 Operator in ambient mode from an Alauda Container Platform involves deleting the following components:

  • Waypoint proxy Gateway resources
  • ZTunnel resource
  • Istio resource
  • IstioCNI resource
  • Alauda Service Mesh v2 Operator
  • ztunnel namespace
  • istio-system namespace
  • istio-cni namespace

You can also optionally remove the Istio custom resource definitions (CRDs).

The Alauda Service Mesh v2 Operator can be uninstalled using the Alauda Container Platform web console.

Procedure

Delete the waypoint proxy Gateway resources

Remove all waypoint proxy Gateway resources from each namespace that has them deployed. You can identify waypoint proxies by the istio.io/waypoint-for label on Gateway resources.

kubectl delete gateway -A -l istio.io/waypoint-for

Remove the ambient data plane label from namespaces

Remove the istio.io/dataplane-mode=ambient label from all namespaces that are enrolled in the ambient data plane:

kubectl label namespaces -l istio.io/dataplane-mode istio.io/dataplane-mode- --overwrite

Delete the ZTunnel resource

  1. In the Alauda Container Platform web console, navigate to Administrator.
  2. Select Marketplace > OperatorHub.
  3. Search for the Alauda Service Mesh v2.
  4. Locate the Alauda Service Mesh v2, and click to select it.
  5. Click All Instances tab.
  6. From the Filter by instance type dropdown, select ZTunnel.
  7. Click the "" button for the ZTunnel resource, then click Delete in the menu.
  8. When prompted, confirm the action by clicking Delete.

Delete the Istio resource

In the Alauda Service Mesh v2 view of OperatorHub:

  1. Click All Instances tab.
  2. From the Filter by instance type dropdown, select Istio.
  3. Click the "" button for the Istio resource, then click Delete in the menu.
  4. When prompted, confirm the action by clicking Delete.

Delete the IstioCNI resource

In the Alauda Service Mesh v2 view of OperatorHub:

  1. Click All Instances tab.
  2. From the Filter by instance type dropdown, select IstioCNI.
  3. Click the "" button for the IstioCNI resource, then click Delete in the menu.
  4. When prompted, confirm the action by clicking Delete.

Uninstall the Alauda Service Mesh v2 Operator

In the Alauda Service Mesh v2 view of OperatorHub:

  1. Click the Uninstall button in the top-right corner.
  2. In the confirmation prompt, read the uninstall notice: Removing the operator will not remove any of its custom resource definitions or managed resources. If you have created a resource instance, you need to delete it manually.
  3. Click Uninstall.

Delete the ztunnel namespace

kubectl delete ns ztunnel

Delete the istio-system namespace

kubectl delete ns istio-system

Delete the istio-cni namespace

kubectl delete ns istio-cni

Uninstalling via the CLI

To uninstall the Alauda Service Mesh v2 Operator in ambient mode from an Alauda Container Platform, you must delete the following:

  • Waypoint proxy Gateway resources
  • ZTunnel resource
  • Istio resource
  • IstioCNI resource
  • Alauda Service Mesh v2 Operator
  • ztunnel project
  • istio-system project
  • istio-cni project

Optionally, you can also delete the Istio custom resource definitions (CRDs).

The Alauda Service Mesh v2 Operator can be uninstalled using the Alauda Container Platform command line interface (CLI).

Procedure

Delete the waypoint proxy Gateway resources

  1. List all waypoint proxy Gateway resources across all namespaces:

    kubectl get gateway -A -l istio.io/waypoint-for

    Example output

    NAMESPACE   NAME       CLASS            ADDRESS        PROGRAMMED   AGE
    bookinfo    waypoint   istio-waypoint   10.4.52.57     True         1d
  2. Delete all waypoint proxy Gateway resources:

    kubectl delete gateway -A -l istio.io/waypoint-for

    Example output

    gateway.gateway.networking.k8s.io "waypoint" deleted from bookinfo namespace

Remove the ambient data plane label and delete the ZTunnel resource

  1. List all namespaces enrolled in the ambient data plane:

    kubectl get ns -l istio.io/dataplane-mode=ambient

    Example output

    NAME       STATUS   AGE
    bookinfo   Active   1d
  2. Remove the istio.io/dataplane-mode label from all enrolled namespaces:

    kubectl label namespaces -l istio.io/dataplane-mode istio.io/dataplane-mode- --overwrite
  3. Get the ZTunnel resource name by executing this command:

    kubectl get ztunnel

    Example output

    NAME      NAMESPACE   READY   STATUS    VERSION   AGE
    default   ztunnel     True    Healthy   v1.28.3   1d
  4. Delete the ZTunnel resource:

    kubectl delete ztunnel/default

    Example output

    ztunnel.sailoperator.io "default" deleted

Delete the Istio resource

  1. Get the Istio resource name by executing this command:

    kubectl get istio

    Example output

    NAME                       NAMESPACE      PROFILE   REVISIONS   READY   IN USE   ACTIVE REVISION   STATUS            VERSION   AGE
    <name_of_custom_resource>  istio-system   ambient   1           1       1        default           ZTunnelNotFound   v1.28.3   1d
  2. Use the name from the previous command's output to replace <name_of_custom_resource>, and then run the following to remove it:

    kubectl delete istio/<name_of_custom_resource>

    Example output

    istio.sailoperator.io "<name_of_custom_resource>" deleted

Delete the IstioCNI resource

  1. Get the IstioCNI resource by executing this command:

    kubectl get istioCNI

    Example output

    NAME      NAMESPACE   PROFILE   READY   STATUS    VERSION   AGE
    default   istio-cni   ambient   True    Healthy   v1.28.3   1d
  2. Run the following to remove it:

    kubectl delete istioCNI/default

    Example output

    istiocni.sailoperator.io "default" deleted

Delete the ztunnel, istio-system, and istio-cni namespaces

  1. Delete the ztunnel namespace with the following command:

    kubectl delete ns ztunnel

    Example output

    namespace "ztunnel" deleted
  2. Delete the istio-system namespace with the following command:

    kubectl delete ns istio-system

    Example output

    namespace "istio-system" deleted
  3. Delete the istio-cni namespace with the following command:

    kubectl delete ns istio-cni

    Example output

    namespace "istio-cni" deleted

Uninstall the Alauda Service Mesh v2 Operator

  1. Delete the servicemesh-operator2 subscription:

    kubectl delete subscription servicemesh-operator2 -n sail-operator

    Example output

    subscription.operators.coreos.com "servicemesh-operator2" deleted from sail-operator namespace

Deleting Istio custom resource definitions

The deletion of Istio custom resource definitions (CRDs) is an optional step.

Procedure

  1. To delete the Istio CRDs, execute the command below:

    kubectl get crds -oname | grep -e istio.io -e sailoperator.io | xargs kubectl delete