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:

  1. In the Google Cloud console, go to the Anthos Features page.

    Go to Anthos Features

  2. In the Config Management row of the Features table, click Details. The Status summary page appears.

  3. Click Disable config management. A confirmation page appears.

  4. On the confirmation page, click Disable config management.

gcloud

To disable Anthos Config Management on a single cluster, run the following command:

gcloud beta container fleet 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 fleet config-management disable

Remove the Config Management Operator

To remove the Config Management Operator, run the following commands:

  1. 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-system namespace are deleted, with the exception of the git-creds Secret, and for versions of Anthos Config Management beginning in 1.9.0, the config-management-operator Deployment, and the config-management-operator Pod. Anthos Config Management cannot function without the config-management-system namespace. 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.
  2. If you need to retain the git-creds Secret, do that now:

    kubectl -n config-management-system get secret git-creds -o yaml
    
  3. Delete the config-management-system namespace:

    kubectl delete ns config-management-system
    
  4. Delete the config-management-monitoring namespace:

    kubectl delete ns config-management-monitoring
    
  5. Delete the ConfigManagement CustomResourceDefinition:

    kubectl delete crd configmanagements.configmanagement.gke.io
    
  6. For Anthos Config Management versions earlier than 1.9.0, delete the Config Management Operator from the kube-system namespace:

    kubectl -n kube-system delete all -l k8s-app=config-management-operator