TSB uninstallation
This page describes the procedure to follow to uninstall TSB from a cluster.
note
The process will be similar for all of the planes (management, control, and data planes), because you’ll need to delete any custom resource for the plane, then delete the operator itself.
Data plane
As the data plane takes care of deploying ingress gateways in your cluster, the first step is to delete all of the IngressGateway custom resources from your cluster.
kubectl delete ingressgateways.install.tetrate.io --all --all-namespaces
This will delete all the IngressGateway deployed in every namespace in the cluster. Once you’ve run this command, the data plane operator will delete the deployments and associated resources for every gateway. This may take some time to ensure that they’re all successfully removed.
To make sure that you gracefully remove the istio-operator
deployment, you
must scale and delete the remaining objects in the data plane operator namespace
in the following order:
kubectl -n istio-gateway scale deployment tsb-operator-data-plane --replicas=0
kubectl -n istio-gateway delete istiooperators.install.istio.io --all
kubectl -n istio-gateway delete deployment --all
This will delete both the TSB and Istio operator deployments stored in the data plane operator namespace. Now you can clean up the validation and mutation web hooks.
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io \
tsb-operator-data-plane-egress \
tsb-operator-data-plane-ingress \
tsb-operator-data-plane-tier1
kubectl delete mutatingwebhookconfigurations.admissionregistration.k8s.io \
tsb-operator-data-plane-egress \
tsb-operator-data-plane-ingress \
tsb-operator-data-plane-tier1
Removing the control plane will remove all TSB components as well as the Istio control plane used by TSB and render any sidecars in the cluster non-functional.
Control Plane
To delete the TSB control plane, first delete the IstioOperator associated with it.
kubectl delete controlplanes.install.tetrate.io --all
It may take some time for the TSB operator in the istio-system namespace to clean up the Istio components, but once it’s complete, delete the validation and mutation web hooks.
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io \
tsb-operator-control-plane
kubectl delete mutatingwebhookconfigurations.admissionregistration.k8s.io \
tsb-operator-control-plane
Then delete the tsb-system namespace.
kubectl delete namespace tsb-system
In order to clean up the cluster-scoped resources, use the tctl install manifest command to render the cluster-operators manifest and delete the resulting manifest.
tctl install manifest cluster-operators --registry=dummy | \
kubectl delete -f - --ignore-not-found
Management plane
To uninstall the management plane, you need to remove the ManagementPlane CR that describes your management plane configuration, which will force the management plane operator to delete any components related to it.
kubectl -n tsb delete managementplanes.install.tetrate.io --all
Then, delete the management plane operator.
kubectl -n tsb delete deployment tsb-operator-management-plane
Finally, delete the validation and mutation web hooks.
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io \
tsb-operator-management-plane
kubectl delete mutatingwebhookconfigurations.admissionregistration.k8s.io \
tsb-operator-management-plane
To clean up the cluster-scoped resources, use the tctl install manifest command to render the management-plane-operator manifest and delete it.
tctl install manifest management-plane-operator --registry=dummy | \
kubectl delete -f - --ignore-not-found