Troubleshooting OSM Uninstall

If for any reason, osm uninstall mesh (as documented in the uninstall guide) fails, you may manually delete OSM resources as detailed below.

Set environment variables for your mesh:

  1. export osm_namespace=osm-system # Replace osm-system with the namespace where OSM is installed
  2. export mesh_name=osm # Replace osm with the OSM mesh name
  3. export osm_version=<osm version>
  4. export osm_ca_bundle=<osm ca bundle>

Delete OSM control plane deployments:

  1. kubectl delete deployment -n $osm_namespace osm-bootstrap
  2. kubectl delete deployment -n $osm_namespace osm-controller
  3. kubectl delete deployment -n $osm_namespace osm-injector

If OSM was installed alongside Prometheus, Grafana, or Jaeger, delete those deployments:

  1. kubectl delete deployment -n $osm_namespace osm-prometheus
  2. kubectl delete deployment -n $osm_namespace osm-grafana
  3. kubectl delete deployment -n $osm_namespace jaeger

If OSM was installed with the OSM Multicluster Gateway, delete it by running the following:

  1. kubectl delete deployment -n $osm_namespace osm-multicluster-gateway

Delete OSM secrets, the meshconfig, and webhook configurations:

Warning: Ensure that no resources in the cluster depend on the following resources before proceeding.

  1. kubectl delete secret -n $osm_namespace $osm_ca_bundle mutating-webhook-cert-secret validating-webhook-cert-secret crd-converter-cert-secret
  2. kubectl delete meshconfig -n $osm_namespace osm-mesh-config
  3. kubectl delete mutatingwebhookconfiguration -l app.kubernetes.io/name=openservicemesh.io,app.kubernetes.io/instance=$mesh_name,app.kubernetes.io/version=$osm_version,app=osm-injector
  4. kubectl delete validatingwebhookconfiguration -l app.kubernetes.io/name=openservicemesh.io,app.kubernetes.io/instance=mesh_name,app.kubernetes.io/version=$osm_version,app=osm-controller

To delete OSM and SMI CRDs from the cluster, run the following.

Warning: Deletion of a CRD will cause all custom resources corresponding to that CRD to also be deleted.

  1. kubectl delete crd meshconfigs.config.openservicemesh.io
  2. kubectl delete crd multiclusterservices.config.openservicemesh.io
  3. kubectl delete crd egresses.policy.openservicemesh.io
  4. kubectl delete crd ingressbackends.policy.openservicemesh.io
  5. kubectl delete crd httproutegroups.specs.smi-spec.io
  6. kubectl delete crd tcproutes.specs.smi-spec.io
  7. kubectl delete crd traffictargets.access.smi-spec.io
  8. kubectl delete crd trafficsplits.split.smi-spec.io