gcloud beta container hub scopes namespaces update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta container hub scopes namespaces update - update a fleet namespace
- SYNOPSIS
gcloud beta container hub scopes namespaces update(NAMESPACE:--scope=SCOPE)[--update-labels=[KEY=VALUE,…]][--update-namespace-labels=[KEY=VALUE,…]][--clear-labels|--remove-labels=[KEY,…]][--clear-namespace-labels|--remove-namespace-labels=[KEY,…]][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)This command can fail for the following reasons:- The project specified does not exist.
- The fleet namespace does not exist in the project.
- The caller does not have permission to access the project or namespace.
- EXAMPLES
- To update the namespace
NAMESPACEin the active project:gcloudbetacontainerhubscopesnamespacesupdateNAMESPACETo update the namespace
NAMESPACEin projectPROJECT_ID:gcloudbetacontainerhubscopesnamespacesupdateNAMESPACE--project=PROJECT_ID - POSITIONAL ARGUMENTS
- Namespace resource - The group of arguments defining the Fleet Namespace. Thearguments 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 inother ways.
To set the
projectattribute:- provide the argument
NAMESPACEon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
To set the
locationattribute:- provide the argument
NAMESPACEon the command line with a fullyspecified name; - global is the only supported location.
This must be specified.
NAMESPACE- ID of the namespace or fully qualified identifier for the namespace.
To set the
namespaceattribute:- provide the argument
NAMESPACEon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--scope=SCOPE- the
To set the
scopeattribute:- provide the argument
NAMESPACEon the command line with a fullyspecified name; - provide the argument
--scopeon the command line.
- provide the argument
- provide the argument
- Namespace resource - The group of arguments defining the Fleet Namespace. Thearguments 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 inother ways.
- 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 namespace-level label KEY=VALUE pairs to update in the clusternamespace. If a 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-labelsis also specified then--clear-labelsis applied first.For example, to remove all labels:
gcloudbetacontainerhubscopesnamespacesupdate--clear-labelsTo remove all existing labels and create two new labels,
andfoo:bazgcloudbetacontainerhubscopesnamespacesupdate--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-labelsis also specified then--update-labelsis applied first.
- At most one of these can be specified:
--clear-namespace-labels- Remove all namespace-level labels from the cluster namespace. If
--update-namespace-labelsis also specified then--clear-namespace-labelsis applied first.For example, to remove all labels:
gcloudbetacontainerhubscopesnamespacesupdatenamespace_name--clear-namespace-labelsTo remove all existing namespace-level labels and create two new labels,
andfoo:bazgcloudbetacontainerhubscopesnamespacesupdatenamespace_name--clear-namespace-labels--update-namespace-labelsfoo=bar,baz=qux --remove-namespace-labels=[KEY,…]- List of namespace-level label keys to remove in the cluster namespace. If alabel does not exist it is silently ignored. If
--update-namespace-labelsis also specified then--update-namespace-labelsis applied first.
- 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 beta and might change without notice. Thesevariants are also available:
gcloudcontainerhubscopesnamespacesupdategcloudalphacontainerhubscopesnamespacesupdate
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.