If you have deployed extensions that you no longer require, you can delete them from management clusters and Tanzu Kubernetes clusters.

Prepare to Delete Extensions

  1. In a terminal, navigate to the folder that contains the unpacked Tanzu Kubernetes Grid extension manifest files, tkg-extensions-v1.3.1+vmware.1/extensions.

    cd <path>/tkg-extensions-v1.3.1+vmware.1/extensions
    

    Run all of the commands in these procedures from this location.

  2. Set the context of kubectl to the management cluster or Tanzu Kubernetes cluster on which the extension is deployed.

    kubectl config use-context contour-test-admin@contour-test
    

IMPORTANT: For all of the extensions, do not delete namespace-role.yaml before the application has been fully deleted. This leads to errors due to the service account that is used by kapp-controller being deleted.

Delete the Contour Extension

  1. Delete the Contour extension.

    kubectl delete -f ingress/contour/contour-extension.yaml
    
  2. Delete the Contour application.

    kubectl delete app contour -n tanzu-system-ingress
    
  3. Delete the Contour namespace.

    kubectl delete -f ingress/contour/namespace-role.yaml
    

Delete the Fluent Bit Extension

  1. Delete the Fluent Bit extension.

    kubectl delete -f logging/fluent-bit/fluent-bit-extension.yaml
    
  2. Delete the Fluent Bit application.

    kubectl delete app fluent-bit -n tanzu-system-logging
    
  3. Delete the Fluent Bit namespace.

    kubectl delete -f logging/fluent-bit/namespace-role.yaml
    

Delete the Prometheus and Grafana Extensions

  1. Delete the Prometheus extension.

    kubectl delete -f monitoring/prometheus/prometheus-extension.yaml
    
  2. Delete the Prometheus application.

    kubectl delete app prometheus -n tanzu-system-monitoring
    
  3. Delete the Prometheus namespace.

    kubectl delete -f monitoring/prometheus/namespace-role.yaml
    
  4. Delete the Grafana extension.

    kubectl delete -f monitoring/grafana/grafana-extension.yaml
    
  5. Delete the Grafana application.
    kubectl delete app grafana -n tanzu-system-monitoring
    
  6. Delete the Grafana namespace.

    kubectl delete -f monitoring/grafana/namespace-role.yaml
    

Delete the External DNS Extension

  1. Delete the External DNS extension.

    kubectl delete -f registry/dns/external-dns-extension.yaml
    
  2. Delete the External DNS application.
    kubectl delete app external-dns -n tanzu-system-registry
    
  3. Delete the External DNS namespace.

    kubectl delete -f dns/external-dns/namespace-role.yaml
    

Delete the Harbor Extension

  1. Delete the Harbor extension.

    kubectl delete -f registry/harbor/harbor-extension.yaml
    
  2. Delete the Harbor application.
    kubectl delete app harbor -n tanzu-system-registry
    
  3. Delete the Harbor namespace.

    kubectl delete -f registry/harbor/namespace-role.yaml
    

Delete the Dex and Gangway Extensions

  1. Delete the Dex extension.

    kubectl delete -f authentication/dex/dex-extension.yaml
    
  2. Delete the Dex application.
    kubectl delete app dex -n tanzu-system-auth
    
  3. Delete the Dex namespace.

    kubectl delete -f authentication/dex/namespace-role.yaml
    
  4. Delete the Gangway extension.

    kubectl delete -f authentication/gangway/gangway-extension.yaml
    
  5. Delete the Gangway application.
    kubectl delete app gangway -n tanzu-system-auth
    
  6. Delete the Gangway namespace.

    kubectl delete -f authentication/gangway/namespace-role.yaml
    

Delete the Extensions Utilities

If you delete all extensions from a cluster, you can remove common extensions utilities.

If the extensions are deployed on a Tanzu Kubernetes cluster, optionally delete the cert-manager.

kubectl delete -f ../cert-manager/

Do not delete cert-manager from management clusters.

check-circle-line exclamation-circle-line close-line
Scroll to top icon