Decommission a Kubernetes Cluster
In this guide, you will remove a Kubernetes cluster from Turbot Guardrails. This involves uninstalling the Helm agent from the cluster and then removing the cluster resource from the Guardrails console.
Prerequisites
Turbot/OwnerorTurbot/Adminpermissions.
Step 1: Uninstall the Helm Agent
Remove the Guardrails agent and all its associated Kubernetes resources:
helm uninstall guardrails-agent-kubernetes --namespace guardrails
This removes the StatefulSet, service account, secrets, and other components that were created during installation.
Step 2: Remove the Cluster from Guardrails
- Navigate to the Kubernetes cluster resource in the Guardrails console.
- Click the Actions menu (top right) and select Remove from Turbot. If you don't see this option, contact your Guardrails administrator for proper access.
- Copy the cluster name and paste it into the confirmation text box.
- Click Delete.
Guardrails will begin the delete process. The time to complete depends on the number of resources and policies that need to be removed: the more resources, the longer it takes.
[!CAUTION] While decommissioning is not irreversible (you can redeploy the agent to reconnect), it can be time-consuming and resource-intensive. Double-check that you're removing the correct cluster before confirming.
Error Handling
The deletion process involves complex database transactions. If deletion fails due to referential integrity issues or database locking:
- Verify that the Helm agent has been fully uninstalled.
- Ensure that event handler and credential policies have been cleared.
- Retry the deletion.
If the error persists after several hours and you have confirmed the agent is uninstalled, contact Turbot Support.