gcloud container fleet 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 …]
NAMESPACE in the active project:
gcloud container fleet scopes namespaces update NAMESPACE
To update the namespace NAMESPACE in project
PROJECT_ID:
gcloud container fleet scopes namespaces update NAMESPACE --project=PROJECT_ID
To set the project attribute:
NAMESPACE on the command line with a fully
specified name;
--project on the command line;
core/project.
To set the location attribute:
NAMESPACE on the command line with a fully
specified name;
NAMESPACE
To set the namespace attribute:
NAMESPACE on the command line.
--scope=SCOPEscope attribute:
NAMESPACE on the command line with a fully
specified name;
--scope on the command line.
--update-labels=[KEY=VALUE,…]-), underscores (_), lowercase characters, and
numbers. Values must contain only hyphens (-), underscores
(_), lowercase characters, and numbers.
--update-namespace-labels=[KEY=VALUE,…]--clear-labels--update-labels is also specified then
--clear-labels is applied first.
For example, to remove all labels:
gcloud container fleet scopes namespaces update --clear-labels
To remove all existing labels and create two new labels,
and
foo:
baz
gcloud container fleet scopes namespaces update --clear-labels --update-labels foo=bar,baz=qux--remove-labels=[KEY,…]--update-labels is also specified then
--update-labels is applied first.
--clear-namespace-labels--update-namespace-labels is also specified then
--clear-namespace-labels is applied first.
For example, to remove all labels:
gcloud container fleet scopes namespaces update namespace_name --clear-namespace-labels
To remove all existing namespace-level labels and create two new labels,
and
foo:
baz
gcloud container fleet scopes namespaces update namespace_name --clear-namespace-labels --update-namespace-labels foo=bar,baz=qux--remove-namespace-labels=[KEY,…]--update-namespace-labels is also specified then
--update-namespace-labels is applied first.
--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.
gcloud alpha container fleet scopes namespaces updategcloud beta container fleet scopes namespaces 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-05-27 UTC.