Uninstall Config Sync Stay organized with collections Save and categorize content based on your preferences.
This page shows you how to uninstall Config Sync from your cluster,disable the Config Management fleet feature on your fleet, anduninstall the ConfigManagement Operator.
This page is for IT administrators and Operators who managethe lifecycle of the underlying tech infrastructure. To learn more about commonroles and example tasks that we reference in Google Cloud content, seeCommon GKE user roles and tasks.
The Config Management fleet feature manages Config Syncusing the ConfigManagement Operator.Because of this architecture, the uninstall steps must be completed in thefollowing order:
- Uninstall Config Sync from your cluster
- Disable the Config Management feature on your fleet
- Uninstall the ConfigManagement Operator from your cluster
Uninstall Config Sync from your cluster
Note: Uninstalling Config Sync will delete allRootSync andRepoSyncobjects on the cluster. Before you continue, you should check the deletionpropagation policies on yourRootSync andRepoSync objects. For moreinformation, seeBulk delete objects.Console
You can't uninstall Config Sync with only the Google Cloud console. UseGoogle Cloud CLI instead.
gcloud
Open theapplySpec manifestthat you created during installation with the Google Cloud CLI.
In the applySpec manifest, set
spec.configSync.enabledtofalse:applySpecVersion:1spec:configSync:enabled:false...Apply the changes:
gcloudbetacontainerfleetconfig-managementapply\--membership=MEMBERSHIP_NAME\--config=CONFIG_YAML\--project=PROJECT_IDReplace the following:
MEMBERSHIP_NAME: add the registered cluster that you want toapply this configuration to. If you registered the cluster in theGoogle Cloud console, the membership name is the same as the name of yourcluster.
CONFIG_YAML: add the path to your
apply-spec.yamlfile.PROJECT_ID: add your project ID.
Terraform
If you usedTerraformto install Config Sync using agke_hub_feature_membershipresource from theGoogle Cloud Platform Provider,then update that resource to uninstall Config Sync. Don't usetheterraform destroy command. Theterraform destroy command doesn't fullyuninstall Config Sync. Some components remain.
Identify the
gke_hub_feature_membershipresource in your Terraformconfiguration files that has aconfigmanagementargument populated.Update the
gke_hub_feature_membershipresource to remove theconfig_syncargument from theconfigmanagement.For example:
resource"google_gke_hub_feature_membership""feature_member"{location="global"feature=google_gke_hub_feature.feature.namemembership=google_gke_hub_membership.membership.membership_idmembership_location=google_gke_hub_membership.membership.locationconfigmanagement{version="1.21.0"}}Apply the Terraform configuration:
terraformapplyConfirm you want to apply the actions described by entering
yes.
Config Connector
If you usedConfig Connectorto install Config Sync using aGKEHubFeatureMembershipresource, then update that resource to uninstall Config Sync.
Identify the
GKEHubFeatureMembershipresource object on your clusterthat has a.spec.configmanagement.configSyncfield populated.Patch the
GKEHubFeatureMembershipresource object to remove the.spec.configmanagement.configSyncfield by setting it to null:kubectlpatchGKEHubFeatureMembershipFEATURE_MEMBERSHIP_OBJECT_NAME\--namespaceFEATURE_MEMBERSHIP_OBJECT_NAMESPACE\-p'{"spec":{"configmanagement":{"configSync": null}}}'Replace the following:
FEATURE_MEMBERSHIP_OBJECT_NAME: add the name of the
GKEHubFeatureMembershipresource object that you previously created.FEATURE_MEMBERSHIP_OBJECT_NAMESPACE: add the namespace thatcontains the
GKEHubFeatureMembershipresource object that youpreviously created.
Disable Config Management on your fleet
Note: If you still want to use Config Management on other clusters inthe Fleet, you can skip this step, but you won't be able to uninstall theConfigManagement Operator until after the Config Management feature is disabledon the fleet or the cluster is removed from the fleet.Console
- In the Google Cloud console, go to theFeature Manager page.
In theConfig Management row of theFeatures table, clickDetails. TheStatus summary page appears.
ClickDisable Config Management. A confirmation page appears.
On the confirmation page, clickDisable Config Management.
gcloud
To disable Config Management on all clusters in the fleet, runthe following command:
Note: The preceding commands don't stop status reporting. If you want tostop status reporting, you need tounregister your cluster.gcloudbetacontainerfleetconfig-managementdisable
Terraform
If you usedTerraformto enable the Config Management feature on your fleet using agoogle_gke_hub_featureresource from the from theGoogle Cloud Platform Provider,then update that resource to disable Config Management on allclusters in the fleet.
Update the HCL file that contains your
google_gke_hub_featureresource to remove thegoogle_gke_hub_featureresource.If you still have a
gke_hub_feature_membershipresource defined with afeaturefield that references the removedgoogle_gke_hub_feature,remove thatgke_hub_feature_membershipresource too.Apply the Terraform configuration:
terraformapplyConfirm you want to apply the actions described by entering
yes.
Config Connector
If you usedConfig Connectorto enable the Config Management feature on your fleet using aGKEHubFeatureresource, then update that resource to disable Config Management onall clusters in the fleet.
Identify the
GKEHubFeatureresource object on your cluster that has a.spec.resourceIDvalue ofconfigmanagement.If you still have a
GKEHubFeatureMembershipresource object defined witha.spec.featureReffield that references thatGKEHubFeatureresourceobject, delete it:kubectldeleteGKEHubFeatureMembershipFEATURE_MEMBERSHIP_OBJECT_NAME\--namespaceFEATURE_MEMBERSHIP_OBJECT_NAMESPACEReplace the following:
FEATURE_MEMBERSHIP_OBJECT_NAME: add the name of the
GKEHubFeatureMembershipresource object that you previously created.FEATURE_MEMBERSHIP_OBJECT_NAMESPACE: add the namespace thatcontains the
GKEHubFeatureMembershipresource object that youpreviously created.
Delete the
GKEHubFeatureresource from your cluster:kubectldeleteGKEHubFeatureFEATURE_OBJECT_NAME\--namespaceFEATURE_OBJECT_NAMESPACEReplace the following:
FEATURE_OBJECT_NAME: add the name of the
GKEHubFeatureresource object that you previously created.FEATURE_OBJECT_NAMESPACE: add the namespace that contains the
GKEHubFeatureresource object that you previously created.
Uninstall the ConfigManagement Operator
Usekubectl to delete the ConfigManagement Operator after you disableConfig Management feature on the fleet orunregister your clusterfrom the fleet.
To remove the ConfigManagement Operator, run the following commands:
Delete the ConfigManagement object from the cluster:
kubectldeleteconfigmanagement--allAfter you run this command, the following things happen:
- Any ClusterRoles and ClusterRoleBindings created in the cluster byConfigManagement Operator are deleted from the cluster.
- Any admission controller configurations installed byConfigManagement Operator are deleted.
- The contents of the
config-management-systemnamespace are deleted, with theexception of thegit-credsSecret, and for versions of Config Sync beginning in 1.9.0, theconfig-management-operatorDeployment, and theconfig-management-operatorPod.ConfigManagement Operator cannot function without theconfig-management-systemnamespace. Any CustomResourceDefinitions (CRDs) created or modified byConfigManagement Operator controller are removed from the clusters wherethey were created or modified. The CRD required to runConfigManagement Operator still exists because from the point of view ofKubernetes, they were added by the user whoinstalled ConfigManagement Operator. Informationabout removing these components is covered in the next step.
If you need to retain the
git-credsSecret, do that now:kubectl-nconfig-management-systemgetsecretgit-creds-oyamlDelete the
config-management-systemnamespace:kubectldeletensconfig-management-systemDelete the
config-management-monitoringnamespace:kubectldeletensconfig-management-monitoringDelete the ConfigManagement CustomResourceDefinition:
kubectldeletecrdconfigmanagements.configmanagement.gke.io
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.