Uninstalling a Topology Operator-Based Deployment
To uninstall a Topology Operator-based deployment, uninstall the release, then delete the namespace.
Uninstall the deployment with the following commands:
helm uninstall release -n namespace
kubectl delete ns namespace
Where release is the Helm release name, such as ag1
,
and namespace is the namespace, such as
matrixx-master
.
You must uninstall in reverse installation order. First run these commands where the master is installed, to prevent it from attempting to recreate the resources you would have otherwise just deleted. Next run these commands in the agent namespaces, and then the engine namespaces. For example, uninstall the multi-namespace example with commands similar to the following:
helm uninstall ag1 -n matrixx-master
helm uninstall ag1 -n matrixx-agent
helm uninstall ag1 -n matrixx-s1e1
helm uninstall ag1 -n matrixx-s1e2
kubectl delete ns matrixx-master
kubectl delete ns matrixx-agent
kubectl delete ns matrixx-s1e1
kubectl delete ns matrixx-s1e2
Running the helm uninstall
in the matrixx-master
namespace creates a pre-delete job that deletes the MtxTopology custom resource (CR).
That triggers the deletion of MtxSubdomain CRs, and that triggers the deletion of
MtxEngine CRs.
Through the use of Kubernetes finalizers, an operator can see that a resource is marked for deletion and apply additional handling. For example, the engine-operator uses this feature to first stop the engines before deleting the engine resources. This uninstall process must be allowed to complete, otherwise, some resources may not be cleaned up as expected.