Uninstall Anthos Config Management
This page shows you how to uninstall Anthos Config Management. To fully uninstall Anthos Config Management, you need to complete two steps. First, disable Anthos Config Management, second remove the Config Management Operator and the Pod that it runs in. The Config Management Operator is a controller that manages Anthos Config Management in a Kubernetes cluster.
Disable Anthos Config Management
Disabling Anthos Config Management removes your ability to manage its on-cluster components centrally from the Google Cloud console and hosted APIs. Any settings that you configured are also forgotten. If you later decide to re-enable Anthos Config Management, you have to recreate the settings for every cluster.
However, disabling this feature does not affect the operation of the on-cluster Anthos Config Management components, nor does it disrupt any configurations or policies that were previously applied to your clusters.
Console - Anthos
To disable Anthos Config Management, complete the following steps:
In the Google Cloud console, go to the Anthos Features page.
In the Config Management row of the Features table, click Details. The Status summary page appears.
Click Disable config management. A confirmation page appears.
On the confirmation page, click Disable config management.
To disable Anthos Config Management on a single cluster, run the following command:
gcloud beta container hub config-management unmanage \ --project=PROJECT_ID \ --membership=MEMBERSHIP_NAME
Replace the following:
MEMBERSHIP_NAME: the name of the registered cluster that you want to remove this configuration from
PROJECT_ID: your project ID
To disable Anthos Config Management and stop Anthos Config Management from managing all clusters in the project, run the following command:
gcloud beta container hub config-management disable
Remove the Config Management Operator
To remove the Config Management Operator, run the following commands:
Delete the ConfigManagement object from the cluster:
kubectl delete configmanagement --all
After you run this command, the following things happen:
- Any ClusterRoles and ClusterRoleBindings created in the cluster by Anthos Config Management are deleted from the cluster.
- Any admission controller configurations installed by Anthos Config Management are deleted.
- The contents of the
config-management-systemnamespace are deleted, with the exception of the
git-credsSecret, and for versions of Anthos Config Management beginning in 1.9.0, the
config-management-operatorDeployment, and the
config-management-operatorPod. Anthos Config Management cannot function without the
config-management-systemnamespace. Any CustomResourceDefinitions (CRDs) created or modified by Anthos Config Management controller are removed from the clusters where they were created or modified. The CRD required to run Anthos Config Management still exists because from the point of view of Kubernetes, they were added by the user who installed Anthos Config Management. Information about removing these components is covered in the next step.
If you need to retain the
git-credsSecret, do that now:
kubectl -n config-management-system get secret git-creds -o yaml
kubectl delete ns config-management-system
kubectl delete ns config-management-monitoring
Delete the ConfigManagement CustomResourceDefinition:
kubectl delete crd configmanagements.configmanagement.gke.io
For Anthos Config Management versions earlier than 1.9.0, delete the Config Management Operator from the
kubectl -n kube-system delete all -l k8s-app=config-management-operator