gcloud container hub scopes update

NAME
gcloud container hub scopes update - update a scope
SYNOPSIS
gcloud container hub scopes update(SCOPE :--location=LOCATION)[--update-labels=[KEY=VALUE,…]][--update-namespace-labels=[KEY=VALUE,…]][--clear-labels    |--remove-labels=[KEY,…]][--clear-namespace-labels    |--remove-namespace-labels=[KEY,…]][--default-upgrade-soaking=DEFAULT_UPGRADE_SOAKING--remove-upgrade-soaking-overrides    |--add-upgrade-soaking-override=ADD_UPGRADE_SOAKING_OVERRIDE--upgrade-selector=[name=NAME],[version=VERSION]--reset-upstream-scope    |--upstream-scope=UPSTREAM_SCOPE][GCLOUD_WIDE_FLAG]
DESCRIPTION
Update an existing Fleet Scope.
EXAMPLES
First retrieve the ID of the scope using the command below.
gcloudcontainerhubscopeslist

Update a scope.

gcloudcontainerhubscopesupdateSCOPE_NAME
POSITIONAL ARGUMENTS
Scope resource - fleet scope resource. The arguments in this group can be usedto specify the attributes of this resource. (NOTE) Some attributes are not givenarguments in this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentscope on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

SCOPE
ID of the scope or fully qualified identifier for the scope.

To set thescope attribute:

  • provide the argumentscope on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--location=LOCATION
The location name.

To set thelocation attribute:

  • provide the argumentscope on the command line with a fullyspecified name;
  • provide the argument--location on the command line;
  • global is the only supported location.
FLAGS
--update-labels=[KEY=VALUE,…]
List of label KEY=VALUE pairs to update. If a label exists, its value ismodified. Otherwise, a new label is created.

Keys must start with a lowercase character and contain only hyphens(-), underscores (_), lowercase characters, andnumbers. Values must contain only hyphens (-), underscores(_), lowercase characters, and numbers.

--update-namespace-labels=[KEY=VALUE,…]
List of scope-level label KEY=VALUE pairs to update in the cluster namespace. Ifa label exists, its value is modified. Otherwise, a new label is' created.
At most one of these can be specified:
--clear-labels
Remove all labels. If--update-labels is also specified then--clear-labels is applied first.

For example, to remove all labels:

gcloudcontainerhubscopesupdate--clear-labels

To remove all existing labels and create two new labels,foo andbaz:

gcloudcontainerhubscopesupdate--clear-labels--update-labelsfoo=bar,baz=qux
--remove-labels=[KEY,…]
List of label keys to remove. If a label does not exist it is silently ignored.If--update-labels is also specified then--update-labels is applied first.
At most one of these can be specified:
--clear-namespace-labels
Remove all scope-level labels from the cluster namespace. If--update-namespace-labels is also specified then--clear-namespace-labels is applied first.

For example, to remove all labels:

gcloudcontainerhubscopesupdatescope_name--clear-namespace-labels

To remove all existing scope-level labels and create two new labels,foo andbaz:

gcloudcontainerhubscopesupdatescope_name--clear-namespace-labels--update-namespace-labelsfoo=bar,baz=qux
--remove-namespace-labels=[KEY,…]
List of scope-level label keys to remove in the cluster namespace. If a labeldoes not exist it is silently ignored. If--update-namespace-labelsis also specified then--update-namespace-labels is applied first.
Rollout Sequencing
--default-upgrade-soaking=DEFAULT_UPGRADE_SOAKING
Configures the default soaking duration for each upgrade propagating through thecurrent scope to become "COMPLETE". Soaking begins after all clusters in thescope are on the target version, or after 30 days if all cluster upgrades arenot complete. Once an upgrade state becomes "COMPLETE", it will automatically bepropagated to the downstream scope. Max is 30 days.

See$gcloud topicdatetimes for information on duration formats.

To configure Rollout Sequencing for a given scope,SCOPE_NAME, this attribute must be set. Todo this while specifying a default soaking duration of 7 days, run:

gcloudcontainerhubscopesupdateSCOPE_NAMEdefault-upgrade-soaking=7d
At most one of these can be specified:
--remove-upgrade-soaking-overrides
Removes soaking time overrides for all upgrades propagating through the currentscope. Consequently, all upgrades will follow the soak time configured by--default-upgrade-soaking until new overrides are configured with--add_upgrade_soaking_override and--upgrade_selector.

To remove all soaking time overrides configured forSCOPE_NAME, run:

gcloudcontainerhubscopesupdateSCOPE_NAME--remove-upgrade-soaking-overrides
Upgrade soaking override.

Defines a specific soaking time override for a particular upgrade propagatingthrough the current scope that supercedes the default soaking durationconfigured by--default-upgrade-soaking.

To set an upgrade soaking override of 12 hours for the upgrade with name,k8s_control_plane, and version,1.23.1-gke.1000, run:

gcloudcontainerhubscopesupdateSCOPE_NAME--add-upgrade-soaking-override=12h--upgrade-selector=name="k8s_control_plane",version="1.23.1-gke.1000"
--add-upgrade-soaking-override=ADD_UPGRADE_SOAKING_OVERRIDE
Overrides the soaking time for a particular upgrade name and version propagatingthrough the current scope. Set soaking to 0 days to bypass soaking andfast-forward the upgrade to the downstream scope.

See$gcloud topicdatetimes for information on duration formats.

This flag argument must be specified if any of the other arguments in this groupare specified.

--upgrade-selector=[name=NAME],[version=VERSION]
Name and version of the upgrade to be overridden where version is a full GKEversion. Currently, name can be eitherk8s_control_plane ork8s_node.

This flag argument must be specified if any of the other arguments in this groupare specified.

At most one of these can be specified:
--reset-upstream-scope
Clears the relationship between the current scope and its upstream scope in therollout sequence.

To remove the link betweenSCOPE_NAME andits upstream scope, run:

gcloudcontainerhubscopesupdateSCOPE_NAME--reset-upstream-scope
--upstream-scope=UPSTREAM_SCOPE
Full resource name of the upstream scope in the format ofprojects/{project}/locations/{location}/scopes/{scope}. GKE will finish upgradeson the upstream scope before applying the same upgrades to the current scope.

To configure the upstream scope forSCOPE_NAME, run:

gcloudcontainerhubscopesupdateSCOPE_NAME--upstream-scope=projects/{upstream_project}/locations/global/scopes/{upstream_scope}
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 help for details.

API REFERENCE
This command uses thegkehub/v1 API. The full documentation forthis API can be found at:https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster
NOTES
These variants are also available:
gcloudalphacontainerhubscopesupdate
gcloudbetacontainerhubscopesupdate

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-05-07 UTC.