This page shows you how to migrate a RootSync that is managed by a fleet membership (formerly Hub) to a RootSync object managed by Config Sync. This migration lets you manage your RootSync in the Google Cloud console.
To check if your RootSync is managed by a fleet membership, run kubectl -n config-management-system get RootSyncs root-sync -o jsonpath='{.metadata.annotations}'
.
If you see the annotation "configmanagement.gke.io/managed-by-hub": "true"
, the RootSync is Hub-managed.
To migrate your RootSync, complete the following steps:
Create a gcloud apply spec with all fields in
spec.configSync
removed exceptspec.configSync.enabled
. Set the value ofspec.configSync.enabled
totrue
.The apply spec should look similar to the following example:
# apply-spec.yaml applySpecVersion: 1 spec: configSync: enabled: true
Apply the configuration:
gcloud beta container fleet config-management apply --config=apply-spec.yaml
To confirm the RootSync is successfully migrated, in the Google Cloud console, go to the Config Sync packages dashboard. You should be able to edit the RootSync when you expand the package name.