Migrate your RootSync to manage in the Google Cloud console

This page shows you how to migrate your Hub-managed RootSync to a RootSync object. The migration enables you to manage your RootSync in the Google Cloud console.

Do not use these instructions if you are managing the RootSync with tools like Terraform or custom tools built on gcloud. To edit your RootSync, use gcloud beta container fleet config-management apply instead.

To check if your RootSync is Hub-managed, 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:

  1. Create a gcloud apply spec with all fields in spec.configSync removed except spec.configSync.enabled. Set the value of spec.configSync.enabled to true.

    The apply spec should look similar to the following example:

    # apply-spec.yaml
    applySpecVersion: 1
    spec:
      configSync:
        enabled: true
    
  2. Apply the configuration:

    gcloud beta container fleet config-management apply --config=apply-spec.yaml
    
  3. 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.

    Go to Config Sync packages dashboard