Uninstall

If you no longer need your K8sGateway environment, you can uninstall the control plane and all gateway proxies. You can also optionally remove related components such as Prometheus and sample apps.

Uninstall K8sGateway

Remove the K8sGateway control plane and gateway proxies.

ℹ️
Did you use Argo CD to install K8sGateway? Skip to the Argo CD steps.
  1. Get all HTTP routes in your environment.

    kubectl get httproutes -A
  2. Remove each HTTP route.

    kubectl delete -n <namespace> httproute <httproute-name>
  3. Get all reference grants in your environment.

    kubectl get referencegrants -A
  4. Remove each reference grant.

    kubectl delete -n <namespace> referencegrant <referencegrant-name>
  5. Get all gateways in your environment that are configured by the gloo-gateway gateway class.

    kubectl get gateways -A | grep gloo-gateway
  6. Remove each gateway.

    kubectl delete -n <namespace> gateway <gateway-name>
  7. Uninstall K8sGateway.

    If you installed K8sGateway in a different namespace than gloo-system, include the -n <namespace> option.

    glooctl uninstall
    ℹ️

    By default, the gloo-system namespace and K8sGateway CRDs created by the glooctl install command are not removed. To remove the namespace and CRDs, include the --all option.

    glooctl uninstall --all
    1. Uninstall the K8sGateway release.

      helm uninstall gloo-gateway -n gloo-system
    2. Remove the gloo-system namespace.

      kubectl delete namespace gloo-system

  8. Remove the Kubernetes Gateway API CRDs.

    kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml

Uninstall with ArgoCD

For ArgoCD installations, use the following steps to clean up your environment.

  1. Port-forward the Argo CD server on port 9999.

    kubectl port-forward svc/argocd-server -n argocd 9999:443
  2. Open the Argo CD UI.

  3. Log in with the admin username and k8sgateway password.

  4. Find the application that you want to delete and click x.

  5. Select Foreground and click Ok.

  6. Verify that the pods were removed from the gloo-system namespace.

    kubectl get pods -n gloo-system

    Example output:

    No resources found in gloo-system namespace.
  1. Port-forward the Argo CD server on port 9999.

    kubectl port-forward svc/argocd-server -n argocd 9999:443
  2. Log in to the Argo CD UI.

    argocd login localhost:9999 --username admin --password k8sgateway --insecure
  3. Delete the application.

    argocd app delete gloo-gateway-oss-helm --cascade --server localhost:9999 --insecure

    Example output:

    Are you sure you want to delete 'gloo-gateway-oss-helm' and all its resources? [y/n] y
    application 'gloo-gateway-oss-helm' deleted   
  4. Verify that the pods were removed from the gloo-system namespace.

    kubectl get pods -n gloo-system

    Example output:

    No resources found in gloo-system namespace.

Uninstall optional components

Remove any optional components that you no longer need, such as sample apps.

  1. If you no longer need the Prometheus stack to monitor resources in your cluster, uninstall the release and delete the namespace.

    helm uninstall kube-prometheus-stack -n monitoring
    kubectl delete namespace monitoring
  2. Remove the httpbin sample app.

    kubectl delete namespace httpbin
  3. Remove the Petstore sample app.

    kubectl delete -f https://raw.githubusercontent.com/solo-io/gloo/v1.13.x/example/petstore/petstore.yaml