- NAME
-
- gcloud alpha container hub config-management update - update the Config Management feature
- SYNOPSIS
-
-
gcloud alpha container hub config-management update(--fleet-default-member-config=FLEET_DEFAULT_MEMBER_CONFIG| [(--config=CONFIG|--origin=ORIGIN|--version=VERSION) :--all-memberships| [--memberships=[MEMBERSHIPS,…] :--location=LOCATION]]) [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)Update the Config Management feature.gcloud alpha container hub config-management updatereplaces theapplyandupgradecommands for feature updates. Theupdatecommand streamlines partial configuration changes by accepting thedescribecommand output as input. In addition to the plural--membershipsand--all-membershipsflags, the command also supports a--versionflag dedicated to upgrades that operates independently of the--configflag. This command errors if the feature does not exist. - EXAMPLES
-
To update only the Config Sync sync directory on an existing membership
configuration, run:
gcloud alpha container fleet config-management describe --view=config --memberships=example-membership-1 > config.yamlsed -i "s/policyDir: foo/policyDir: bar/g" config.yamlgcloud alpha container hub config-management update --config=config.yaml --memberships=example-membership-1To update the Config Sync version for all memberships to
, run:${VERSION}gcloud alpha container hub config-management update --version="${VERSION}" --all-membershipsTo update the fleet-default membership configuration and sync select membership configurations to it, run:
gcloud alpha container hub config-management update --fleet-default-member-config=config.yamlgcloud alpha container hub config-management update --origin=fleet --memberships=example-membership-1,example-membership-2 - REQUIRED FLAGS
-
-
Exactly one of these must be specified:
--fleet-default-member-config=FLEET_DEFAULT_MEMBER_CONFIG-
Path to YAML file, or
-to read from stdin, that specifies the fleet-default membership configuration to update the feature to. Accepts the same schema as theMembershipSpecAPI field. Provides the additional field-handling documented at https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/gcloud-configuration-field-behavior.To update only the Config Sync sync directory on the existing fleet-default membership configuration, run:
gcloud alpha container fleet config-management describe --view=fleet-default-member-config > config.yamlsed -i "s/policyDir: foo/policyDir: bar/g" config.yamlgcloud alpha container hub config-management update --fleet-default-member-config=config.yamlTo achieve the same result in a single invocation, run:
gcloud alpha container fleet config-management describe --view=fleet-default-member-config | sed "s/policyDir: foo/policyDir: bar/g" | gcloud alpha container hub config-management update --fleet-default-member-config="-" -
Or at least one of these can be specified:
-
MEMBERSHIP CONFIGURATION FLAGS. Updates membership configuration(s), but does not wait for the resulting on-cluster changes to complete.Exactly one of these must be specified:
--config=CONFIG-
Path to YAML file, or
-to read from stdin, that specifies the configuration to update the target membership(s) to. Accepts the same schema as theSpecAPI field. Provides the additional field-handling documented at https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/gcloud-configuration-field-behavior.To update the entire configuration for select memberships to that specified in a
config.yaml, run:gcloud alpha container hub config-management update --config=path/to/config.yaml --memberships=example-membership-1,example-membership-2To update only the Config Sync sync directory on an existing membership configuration in a single invocation, making sure to first inspect the existing membership configuration, run:
gcloud alpha container fleet config-management describe --view=config --memberships=example-membership-1gcloud alpha container fleet config-management describe --view=config --memberships=example-membership-1 | sed "s/policyDir: foo/policyDir: bar/g" | gcloud alpha container hub config-management update --config="-" --memberships=example-membership-1 --origin=ORIGIN-
Update the configuration of the target membership(s) to the fleet-default
membership configuration. Errors if the fleet-default membership
configuration is not set; see the
--fleet-default-member-configflag.ORIGINmust be (only one value is supported):fleet. -
Or at least one of these can be specified:
-
PER-FIELD FLAGS. Updates a single field and preserves all other existing configuration fields for target membership(s). Use the--configflag to update other configuration fields.Warns if the
configSyncfield is not enabled. Only if theconfigSyncfield is enabled according to theconfigSync.enabledfield description does the feature install and manage Config Sync based on the membership configuration field values. Use--verbosity=errorto suppress the warning. --version=VERSION-
Version of Config Sync to update the target membership configuration(s) to.
Upgrades Config Sync if the
configSyncfield is enabled, and logs a warning otherwise. See thePER-FIELD FLAGSsection above for details. To bypass the upgrade confirmation prompt, use--quiet. Find supported versions and the default version behavior in theversionfield description.To upgrade all memberships to the latest version, unless the
configSyncfield is not enabled for any membership, for which the flag will log a warning, run:gcloud alpha container hub config-management update --version="" --all-memberships
-
-
At most one of these can be specified:
--all-memberships- All memberships in the fleet.
-
Or at least one of these can be specified:
-
Membership resource - The group of arguments defining one or more memberships.
The arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but can
be set in other ways.
To set the
projectattribute:-
provide the argument
--membershipson the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
-
provide the argument
--memberships=[MEMBERSHIPS,…]-
IDs of the memberships or fully qualified identifiers for the memberships.
To set the
membershipsattribute:-
provide the argument
--membershipson the command line.
This flag argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location=LOCATION-
Location for the memberships.
To set the
locationattribute:-
provide the argument
--membershipson the command line with a fully specified name; -
provide the argument
--locationon the command line; -
set the property
gkehub/location.
-
provide the argument
-
Membership resource - The group of arguments defining one or more memberships.
The arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but can
be set in other ways.
-
-
Exactly one of these must be specified:
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha container hub config-management update
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-04-07 UTC.