Uninstall in-cluster Cloud Service Mesh
This page explains how to uninstall in-cluster Cloud Service Mesh if you are using the Istio APIs. If you are using Compute Engine APIs, no steps are necessary. See the Cloud Service Mesh overview to understand the differences.
Following these instructions to uninstall in-cluster Cloud Service Mesh removes all configurations.
If you are uninstalling managed Cloud Service Mesh, follow the managed uninstallation guide instead.
If you are migrating from in-cluster to managed, follow the Migration guide instead.
Uninstall Cloud Service Mesh
Use the following commands to uninstall all Cloud Service Mesh components.
To prevent interrupting application traffic:
- Downgrade any STRICT mTLS policies to PERMISSIVE.
- Remove any AuthorizationPolicy that may block traffic.
Disable sidecar auto-injection on your namespace(s), if it is enabled. Run the following command to display namespace labels:
kubectlgetnamespaceYOUR_NAMESPACE--show-labelsThe output is similar to the following:
NAMESTATUSAGELABELS demoActive4d17histio.io/rev=asm-181-5If you see
istio.io/rev=in the output under theLABELScolumn, remove it:kubectllabelnamespaceYOUR_NAMESPACEistio.io/rev-If you see
istio-injectionin the output under theLABELScolumn, remove it:kubectllabelnamespaceYOUR_NAMESPACEistio-injection-If you don't see either the
istio.io/revoristio-injectionlabels, then auto-injection wasn't enabled on the namespace.Restart your workloads that have sidecars injected to remove the proxies.
Delete the
validatingwebhooksconfigurationandmutatingwebhookconfigurationfrom your cluster, if they exist:kubectldeletevalidatingwebhookconfiguration,mutatingwebhookconfiguration-loperator.istio.io/component=Pilot,istio.io/owned-by!=mesh.googleapis.comOnce all workloads come up and no proxies are observed, then you can safely delete the in-cluster control plane to stop billing.
To remove the in-cluster control plane, run the following command:
istioctluninstall--purgeIf there are no other control planes, you can delete the
istio-systemnamespace to get rid of all Cloud Service Mesh resources. Otherwise, delete the services corresponding to the Cloud Service Mesh revisions. This avoids deleting shared resources, such as CRDs.Optionally, Remove Istio CRs, Isto CRDs, istio-(revision) configmap, asm-options configmap,
istio-systemandasm-systemnamespaces to remove service mesh from the cluster or use them in another Istio API compatible service mesh.Remove Istio CRs:
kubectldeletegateways,virtualservices,destinationrules,serviceentries,envoyfilters,sidecars,peerauthentications,requestauthentications,authorizationpolicies,telemetries,wasmplugins,proxyconfigs--all--all-namespacesRemove Istio CRDs:
kubectlgetcrds-oname|grep--color=never'istio.io'|xargskubectldeleteRemove istio-(revision) configmap. You can skip this step if you delete the
istio-systemnamespace.kubectldeleteconfigmapistio-RELEASE_CHANNEL-nistio-systemReplace RELEASE_CHANNEL with your release channel
Remove
istio-systemnamespace:kubectldeletenamespaceistio-system--ignore-not-found=trueRemove
asm-systemnamespace:kubectldeletenamespaceasm-system--ignore-not-found=trueCheck if the deletions were successful:
kubectlgetns ``` Theoutputshouldindicatea`Terminating`stateandreturnasshown, otherwiseyoumighthavetomanuallydeleteanyremainingresourcesin thenamespacesandtryagain. ```sh NAMESTATUSAGE istio-systemTerminating71m asm-systemTerminating71m ```
If you will delete your clusters, or have already deleted them, ensure that each cluster is unregistered from your fleet.
If you plan to stop using Cloud Service Mesh at the fleet level, disable the service mesh feature for your fleet host project.
gcloudcontainerhubmeshdisable--projectFLEET_PROJECT_IDWhere FLEET_PROJECT_ID is the ID of your Fleet Host project.
Once you've completed these steps, all Cloud Service Mesh components, including proxies, in-cluster certificate authorities, and RBAC roles and bindings, are systematically removed from the cluster. During the installation process, a Google-owned service account is granted the necessary permissions to establish the service mesh resources within the cluster. These uninstall instructions don't revoke these permissions, allowing for a seamless re-activation of Cloud Service Mesh in the future.