gcloud container hub policycontroller content bundles set BUNDLE_NAME [--all-memberships | [--memberships=[MEMBERSHIPS,…] : --location=LOCATION]] [--exempted-namespaces=EXEMPTED_NAMESPACES | --no-exempted-namespaces] [GCLOUD_WIDE_FLAG …]
The namespace exclusion flag (--exempted-namespaces) will specify a
set of namespaces that the installed bundle will ignore. Subsequent calls with
the same bundle name and this flag will overwrite what namespaces are being
ignored. Using --no-exempted-namespaces or specifying no namespaces
with --exempted-namespaces will remove all namespaces from the
ignore list.
remove command.
gcloud container hub policycontroller content bundles set cis-k8s-v1.5.1To install a policy bundle, while ignoring (exempting) certain namespaces from being affected by the bundle:
gcloud container hub policycontroller content bundles set cis-k8s-v1.5.1 --exempted-namespaces=kube-system,gatekeeper-systemTo remove all exempted namespaces from a particular bundles ignore list:
gcloud container hub policycontroller content bundles set cis-k8s-v1.5.1 --no-exempted-namespacesBUNDLE_NAME--all-membershipsproject attribute:
--memberships on the command line with a fully
specified name;
--project on the command line;
core/project.
--memberships=[MEMBERSHIPS,…]
To set the memberships attribute:
--memberships on the command line.
--location=LOCATIONlocation attribute:
--memberships on the command line with a fully
specified name;
--location on the command line;
gkehub/location.
--exempted-namespaces=EXEMPTED_NAMESPACES--no-exempted-namespaces--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 hub policycontroller content bundles setgcloud beta container hub policycontroller content bundles set
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.