gcloud container bare-metal admin-clusters enroll (ADMIN_CLUSTER : --location=LOCATION) (--admin-cluster-membership=ADMIN_CLUSTER_MEMBERSHIP : --admin-cluster-membership-location=ADMIN_CLUSTER_MEMBERSHIP_LOCATION; default="global") [--async] [GCLOUD_WIDE_FLAG …]
my-cluster
managed in location us-west1 with admin
cluster membership of
projects/my-project/locations/us-west1/memberships/my-admin-cluster-membership,
run:
gcloud container bare-metal admin-clusters enroll my-cluster --location=us-west1 --admin-cluster-membership=projects/my-project/locations/us-west1/memberships/my-admin-cluster-membership
To set the project attribute:
admin_cluster on the command line with a fully
specified name;
--project on the command line;
core/project.
ADMIN_CLUSTER
To set the admin_cluster attribute:
admin_cluster on the command line.
--location=LOCATIONlocation attribute:
admin_cluster on the command line with a fully
specified name;
--location on the command line;
container_bare_metal/location.
To set the project attribute:
--admin-cluster-membership on the command line
with a fully specified name;
--project on the command line;
core/project.
--admin-cluster-membership=ADMIN_CLUSTER_MEMBERSHIP
To set the admin_cluster_membership attribute:
--admin-cluster-membership on the command
line.
--admin-cluster-membership-location=ADMIN_CLUSTER_MEMBERSHIP_LOCATION; default="global"location attribute:
--admin-cluster-membership on the command line
with a fully specified name;
--admin-cluster-membership-location on the
command line.
--async--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 bare-metal admin-clusters enrollgcloud beta container bare-metal admin-clusters enroll
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.