Uninstalling

This page explains how to uninstall Anthos Service Mesh.

Uninstalling Anthos Service Mesh

Use the following commands to uninstall the Anthos Service Mesh components that were installed with the original configuration profile. These commands also delete the istio-system namespace and all custom resource definitions (CRDs), including any CRDs that you applied. If you created CRDs, make sure you have copies of them.

  1. Turn off sidecar auto-injection on your namespace(s), if it is enabled:

     kubectl get namespace YOUR_NAMESPACE --show-labels
    

    The output is similar to the following:

     NAME   STATUS   AGE     LABELS
     demo   Active   4d17h   istio.io/rev=asm-181-5

    If you see istio.io/rev= in the output under the LABELS column, remove it:

     kubectl label namespace YOUR_NAMESPACE istio.io/rev-
    

    If you see istio-injection in the output under the LABELS column, remove it:

     kubectl label namespace YOUR_NAMESPACE istio-injection-
    

    If you don't see either the istio.io/rev or istio-injection labels, then auto-injection wasn't enabled on the namespace.

  2. Restart your workloads that have sidecars injected to remove the proxies.

  3. Remove the control plane, by choosing one of these next steps, depending on your configuration:

    • If you installed Anthos Service Mesh on GKE on VMware, GKE on AWS, Amazon Elastic Kubernetes Service, or Microsoft Azure Kubernetes Service:

      istioctl manifest generate --manifests=YOUR_MANIFESTS_DIRECTORY --set profile=asm-multicloud | kubectl delete --ignore-not-found=true -f -
      
    • If you installed Anthos Service Mesh on Google Kubernetes Engine:

      istioctl manifest generate --manifests=YOUR_MANIFESTS_DIRECTORY --set profile=asm-gcp | kubectl delete --ignore-not-found=true -f -
      
  4. Delete the istio-system and asm-system namespaces:

     kubectl delete namespace istio-system asm-system --ignore-not-found=true
    
  5. Check if the deletions were successful:

     kubectl get ns
    

    The output should indicate a Terminating state and return as shown, otherwise you might have to manually delete any remaining resources in the namespaces and try again.

     NAME                 STATUS       AGE
     istio-system         Terminating  71m
     asm-system           Terminating  71m