Delete the Contour extension from a Tanzu Kubernetes cluster.

Complete the steps in order. Do not delete the Contour namespace and role objects before the Contour extension and app are deleted. Deleting the Contour namespace and role objects deletes the service account used by kapp-controller. If this service account is deleted before the app and extension are deleted, it can lead to system errors.

Procedure

  1. Change directory to where you have downloaded the Contour extension files.
    cd /tkg-extensions/extensions/ingress/contour/
    Note: All subsequent paths listed in this documentation are relative to this path.
  2. Delete the Contour extension.
    kubectl delete -f contour-extension.yaml
    Expected results:
    extension.clusters.tmc.cloud.vmware.com "contour" deleted
  3. Delete the Contour app.
    kubectl delete app contour -n tanzu-system-ingress
    Expected results:
    app.kappctrl.k14s.io "contour" deleted
  4. Verify that the Contour extension is deleted.
    kubectl get extension contour -n tanzu-system-ingress
    Expected result: The extension is NotFound.
    extensions.clusters.tmc.cloud.vmware.com "contour" not found
  5. Verify that the Contour app is deleted.
    kubectl get app contour -n tanzu-system-ingress
    Expected result: The app is Not Found.
    apps.kappctrl.k14s.io "contour" not found
  6. Delete the Contour namespace.
    Only after you have confirmed that the Contour extension and app are fully deleted is safe to delete the namespace and role objects.
    kubectl delete -f namespace-role.yaml
    Expected result: The namespace where Contour is deployed, and the associated role-based access control objects, are deleted.
    namespace "tanzu-system-ingress" deleted
    serviceaccount "contour-extension-sa" deleted
    role.rbac.authorization.k8s.io "contour-extension-role" deleted
    rolebinding.rbac.authorization.k8s.io "contour-extension-rolebinding" deleted
    clusterrole.rbac.authorization.k8s.io "contour-extension-cluster-role" deleted
    clusterrolebinding.rbac.authorization.k8s.io "contour-extension-cluster-rolebinding" deleted