Perform an uninstallation#

Introduction#

The following instructions describe how to perform an uninstallation of Aspen Mesh. Perform the tasks in order.

When to perform an uninstallation#

Perform an uninstallation when either of the following is true:

  • You no longer want to use Aspen Mesh on your cluster.

  • You want to temporarily uninstall Aspen Mesh so you can perform a clean installation.

You don’t need to perform an uninstallation if you want to perform an upgrade.

Uninstall the control plane and gateway components#

  1. Did you previously install the Istio egress gateway?

    • Yes:

      • Uninstall the Istio egress gateway:

        $ helm uninstall istio-egress --namespace <egressNamespaceName> --wait
        
      • Go to step 2.

    • No:

      • Go to step 2.

  2. Is Aspen Mesh installed on an OpenShift cluster?

    • Yes:

      • Delete the OpenShift route for the ingress gateway:

        $ oc delete route istio-ingressgateway --namespace <ingressNamespaceName>
        
      • Go to step 3.

    • No:

      • Go to step 3.

  3. Uninstall the Istio ingress gateway:

    $ helm uninstall istio-ingress --namespace <ingressNamespaceName> --wait
    
  4. Uninstall the Istio control plane:

    $ helm uninstall istiod --namespace istio-system --wait
    

(OpenShift only) Uninstall the Istio CNI plugin#

Important

Perform this task only if Aspen Mesh is installed on an OpenShift cluster.

  • Uninstall the Istio CNI plugin:

    $ helm uninstall istio-cni --namespace kube-system --wait
    

    Note

    Uninstalling the Istio CNI plugin also deletes the istio-cni network-attachment definition in the default namespace.

Uninstall the control-plane dependencies#

  1. Uninstall the cluster-wide objects used by the Istio control plane in the istio-system namespace:

    $ helm uninstall istio-base --namespace istio-system --wait
    
  2. Delete the istio-system namespace:

    $ kubectl delete namespace istio-system
    

    Note

    If you previously plugged in CA certificates, deleting the istio-system namespace will delete the cacerts certificate secret in the istio-system namespace.

Delete the Istio CRDs#

  1. List all remaining custom Istio objects:

    $ kubectl get istio-io --all-namespaces
    

    Note

    At this point, all custom Istio objects (objects based on the Istio CRDs) that were created during a clean installation or an upgrade of Aspen Mesh have already been deleted. Therefore, this command lists only any custom Istio objects that were not created during a clean installation or an upgrade of Aspen Mesh.

  2. Are there any remaining custom Istio objects?

    • Yes:

      • If there’s a possibility you’ll need to re-create these remaining custom Istio objects later (for example, after performing a clean installation of Aspen Mesh), make sure you have a manifest for each one.

      • Go to step 3.

    • No:

      • Go to step 3.

  3. Delete the Istio CRDs:

    $ kubectl get crds --output name | grep 'istio.io' | xargs kubectl delete
    

    Note

    Helm does not delete or upgrade CRDs. If you don’t delete the Istio CRDs and then later perform a clean installation of Aspen Mesh, the clean installation will not upgrade (or downgrade) the versions of the Istio CRDs.