OSM Mesh Uninstall Troubleshooting Guide
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:
export osm_namespace=osm-system # Replace osm-system with the namespace where OSM is installedexport mesh_name=osm # Replace osm with the OSM mesh nameexport osm_version=<osm version>export osm_ca_bundle=<osm ca bundle>
Delete OSM control plane deployments:
kubectl delete deployment -n $osm_namespace osm-bootstrapkubectl delete deployment -n $osm_namespace osm-controllerkubectl delete deployment -n $osm_namespace osm-injector
If OSM was installed alongside Prometheus, Grafana, or Jaeger, delete those deployments:
kubectl delete deployment -n $osm_namespace osm-prometheuskubectl delete deployment -n $osm_namespace osm-grafanakubectl delete deployment -n $osm_namespace jaeger
If OSM was installed with the OSM Multicluster Gateway, delete it by running the following:
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.
kubectl delete secret -n $osm_namespace $osm_ca_bundle mutating-webhook-cert-secret validating-webhook-cert-secret crd-converter-cert-secretkubectl delete meshconfig -n $osm_namespace osm-mesh-configkubectl delete mutatingwebhookconfiguration -l app.kubernetes.io/name=openservicemesh.io,app.kubernetes.io/instance=$mesh_name,app.kubernetes.io/version=$osm_version,app=osm-injectorkubectl 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.
kubectl delete crd meshconfigs.config.openservicemesh.iokubectl delete crd multiclusterservices.config.openservicemesh.iokubectl delete crd egresses.policy.openservicemesh.iokubectl delete crd ingressbackends.policy.openservicemesh.iokubectl delete crd httproutegroups.specs.smi-spec.iokubectl delete crd tcproutes.specs.smi-spec.iokubectl delete crd traffictargets.access.smi-spec.iokubectl delete crd trafficsplits.split.smi-spec.io
