Kubernetes
Uninstall the agent
Remove the LevelFour agent from a Kubernetes cluster, disconnect the cluster in the dashboard and clear the namespace labels.
Remove the agent
helm uninstall levelfour-agent -n levelfour
kubectl delete namespace levelfourargocd app delete levelfour-agent --cascade
kubectl delete namespace levelfourIf an app of apps or an ApplicationSet creates the Application, remove it from that source instead, or Argo CD creates it again.
Remove the HelmRelease and the OCIRepository from your repository. When Flux deletes the HelmRelease, it uninstalls the release. Then delete the namespace:
kubectl delete namespace levelfourRemove the helm_release and apply. Then delete the namespace:
kubectl delete namespace levelfourThis removes everything the chart created, including the ClusterRole and its binding. Deleting the namespace also removes the Secret that holds the token or install key.
Disconnect the cluster
Disconnect the cluster on Connect Providers > Kubernetes. For a cluster installed with Helm, this revokes its token. Disconnecting frees the cluster's name for reuse.
Remove the agent first. An agent that keeps running with an install key logs 409 cluster_disconnected after you disconnect its cluster. The install key keeps working for your other clusters, so revoke it only when no cluster uses it.
Remove the namespace labels
The levelfour.ai/recommendations labels on your namespaces do nothing once the agent is gone. To remove them too:
kubectl label namespace --all levelfour.ai/recommendations-