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.2.0+vmware.1/extensions.

    cd <path>/tkg-extensions-v1.2.0+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 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 the common extensions utilities.

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

    Do not delete cert-manager from management clusters.

    kubectl delete -f ../cert-manager/
    
  2. Delete the Kapp controller.

    kubectl delete -f kapp-controller.yaml
    
  3. Delete the Tanzu Mission Control extension manager.

    kubectl delete -f tmc-extension-manager.yaml
    
check-circle-line exclamation-circle-line close-line
Scroll to top icon