gcloud container hub scopes rbacrolebindings create (NAME : --location=LOCATION --scope=SCOPE) (--custom-role=CUSTOM_ROLE | --role=ROLE) (--group=GROUP | --user=USER) [--labels=[KEY=VALUE,…]] [GCLOUD_WIDE_FLAG …]
RBRB in scope
SCOPE for user person@google.com, run:
gcloud container hub scopes rbacrolebindings create RBRB --scope=SCOPE --role=admin --user=person@google.com
To create a viewer RBAC RoleBinding RBRB in scope
SCOPE for group people@google.com, run:
gcloud container hub scopes rbacrolebindings create RBRB --scope=SCOPE --role=viewer --group=people@google.com
To create an RBAC RoleBinding with a custom role custom-role in
scope SCOPE for user person@google.com, run:
gcloud container hub scopes rbacrolebindings create RBRB --scope=SCOPE --role=admin --user=person@google.com --custom-role=custom-role
To set the project attribute:
NAME on the command line with a fully
specified name;
--project on the command line;
core/project.
NAME
To set the rbacrolebinding attribute:
NAME on the command line.
--location=LOCATIONlocation attribute:
NAME on the command line with a fully
specified name;
--location on the command line;
gkehub/location.
--scope=SCOPEscope attribute:
NAME on the command line with a fully
specified name;
--scope on the command line.
--custom-role=CUSTOM_ROLE--role=ROLEROLE must be one of: admin,
edit, view.
--group=GROUP--user=USER--labels=[KEY=VALUE,…]-), underscores (_), lowercase characters, and
numbers. Values must contain only hyphens (-), underscores
(_), lowercase characters, and numbers.
--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 scopes rbacrolebindings creategcloud beta container hub scopes rbacrolebindings create
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.