gcloud beta container bare-metal clusters create (CLUSTER : --location=LOCATION) --version=VERSION (--admin-cluster-membership=ADMIN_CLUSTER_MEMBERSHIP : --admin-cluster-membership-location=ADMIN_CLUSTER_MEMBERSHIP_LOCATION --admin-cluster-membership-project=ADMIN_CLUSTER_MEMBERSHIP_PROJECT) (--control-plane-load-balancer-port=CONTROL_PLANE_LOAD_BALANCER_PORT (--control-plane-vip=CONTROL_PLANE_VIP --ingress-vip=INGRESS_VIP) (--enable-manual-lb | [--bgp-address-pools=[addresses=ADDRESSES],[avoid-buggy-ips=AVOID-BUGGY-IPS],[manual-assign=MANUAL-ASSIGN],[pool=POOL] --bgp-asn=BGP_ASN --bgp-peer-configs=[asn=ASN,ip=IP,control-plane-nodes=NODE_IP_1;NODE_IP_2,…] : [--bgp-load-balancer-node-configs=[node-ip=IP,labels=KEY1=VALUE1;KEY2=VALUE2,…] : --bgp-load-balancer-node-labels=[KEY=VALUE,…] --bgp-load-balancer-node-taints=[KEY=VALUE:EFFECT,…] --bgp-load-balancer-registry-burst=BGP_LOAD_BALANCER_REGISTRY_BURST --bgp-load-balancer-registry-pull-qps=BGP_LOAD_BALANCER_REGISTRY_PULL_QPS --disable-bgp-load-balancer-serialize-image-pulls]] | [--metal-lb-address-pools=[addresses=ADDRESSES],[avoid-buggy-ips=AVOID-BUGGY-IPS],[manual-assign=MANUAL-ASSIGN],[pool=POOL] : --metal-lb-load-balancer-node-configs=[labels=LABELS],[node-ip=NODE-IP] --metal-lb-load-balancer-node-labels=[KEY=VALUE,…] --metal-lb-load-balancer-node-taints=[KEY=VALUE:EFFECT,…] --disable-metal-lb-load-balancer-serialize-image-pulls --metal-lb-load-balancer-registry-burst=METAL_LB_LOAD_BALANCER_REGISTRY_BURST --metal-lb-load-balancer-registry-pull-qps=METAL_LB_LOAD_BALANCER_REGISTRY_PULL_QPS])) ((((--control-plane-node-configs=[labels=LABELS],[node-ip=NODE-IP] : --control-plane-node-labels=[KEY=VALUE,…] --control-plane-node-taints=[KEY=VALUE:EFFECT,…] --control-plane-registry-burst=CONTROL_PLANE_REGISTRY_BURST --control-plane-registry-pull-qps=CONTROL_PLANE_REGISTRY_PULL_QPS --disable-control-plane-serialize-image-pulls))) : --api-server-args=[KEY=VALUE,…]) ((--lvp-node-mounts-config-path=LVP_NODE_MOUNTS_CONFIG_PATH --lvp-node-mounts-config-storage-class=LVP_NODE_MOUNTS_CONFIG_STORAGE_CLASS) ((--lvp-share-path=LVP_SHARE_PATH --lvp-share-storage-class=LVP_SHARE_STORAGE_CLASS) : --shared-path-pv-count=SHARED_PATH_PV_COUNT)) [--admin-users=ADMIN_USERS] [--annotations=[KEY=VALUE,…]] [--async] [--binauthz-evaluation-mode=BINAUTHZ_EVALUATION_MODE] [--description=DESCRIPTION] [--enable-application-logs] [--login-user=LOGIN_USER] [--maintenance-address-cidr-blocks=[MAINTENANCE_ADDRESS_CIDR_BLOCKS,…]] [--validate-only] [--container-runtime=CONTAINER_RUNTIME --max-pods-per-node=MAX_PODS_PER_NODE] [[(--island-mode-pod-address-cidr-blocks=POD_ADDRESS,[POD_ADDRESS,…] --island-mode-service-address-cidr-blocks=SERVICE_ADDRESS,[…]) : --enable-advanced-networking --enable-multi-nic-config --enable-sr-iov-config]] [--uri=URI : --no-proxy=[NO_PROXY,…]] [GCLOUD_WIDE_FLAG …]
(BETA) Create an Anthos cluster on bare metal.
my-cluster
managed in location us-west1, run:
gcloud beta container bare-metal clusters create my-cluster --location=us-west1
To set the project attribute:
cluster on the command line with a fully
specified name;
--project on the command line;
core/project.
CLUSTER
To set the cluster attribute:
cluster on the command line.
--location=LOCATIONlocation attribute:
cluster on the command line with a fully
specified name;
--location on the command line;
container_bare_metal/location.
--version=VERSIONExamples:
gcloud beta container bare-metal clusters create
--admin-cluster-membership=projects/example-project-12345/locations/us-west1/memberships/example-admin-cluster-nameor
gcloud beta container bare-metal clusters create
--admin-cluster-membership-project=example-project-12345
--admin-cluster-membership-location=us-west1
--admin-cluster-membership=example-admin-cluster-nameThe arguments in this group can be used to specify the attributes of this resource.
--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_LOCATIONlocation attribute:
--admin-cluster-membership on the command line
with a fully specified name;
--admin-cluster-membership-location on the
command line.
--admin-cluster-membership-project=ADMIN_CLUSTER_MEMBERSHIP_PROJECTproject attribute:
--admin-cluster-membership on the command line
with a fully specified name;
--admin-cluster-membership-project on the
command line.
--control-plane-load-balancer-port=CONTROL_PLANE_LOAD_BALANCER_PORT--control-plane-vip=CONTROL_PLANE_VIP--ingress-vip=INGRESS_VIP--enable-manual-lb--bgp-address-pools=[addresses=ADDRESSES],[avoid-buggy-ips=AVOID-BUGGY-IPS],[manual-assign=MANUAL-ASSIGN],[pool=POOL]Examples:
To specify configurations for two address pools pool1 and
pool2,
gcloud beta container bare-metal clusters create example_cluster
--bgp-address-pools 'pool=pool1,avoid-buggy-ips=True,manual-assign=True,addresses=192.168.1.1/32;192.168.1.2-192.168.1.3'
--bgp-address-pools 'pool=pool2,avoid-buggy-ips=False,manual-assign=False,addresses=192.168.2.1/32;192.168.2.2-192.168.2.3'Use quote around the flag value to escape semicolon in the terminal.
This flag argument must be specified if any of the other arguments in this group are specified.--bgp-asn=BGP_ASN--bgp-peer-configs=[asn=ASN,ip=IP,control-plane-nodes=NODE_IP_1;NODE_IP_2,…]Examples:
To specify configurations for two peers of BGP autonomous system number (ASN) 10000 and 20000,
gcloud beta container bare-metal clusters create example_cluster
--bgp-peer-configs 'asn=10000,ip=192.168.1.1,control-plane-nodes=192.168.1.2;192.168.1.3'
--bgp-peer-configs 'asn=20000,ip=192.168.2.1,control-plane-nodes=192.168.2.2;192.168.2.3'Use quote around the flag value to escape semicolon in the terminal.
This flag argument must be specified if any of the other arguments in this group are specified.--bgp-load-balancer-node-configs=[node-ip=IP,labels=KEY1=VALUE1;KEY2=VALUE2,…]Examples:
To specify configurations for two nodes of IP 192.168.0.1 and
192.168.1.1,
gcloud beta container bare-metal clusters create example_cluster
--bgp-load-balancer-node-configs 'node-ip=192.168.0.1,labels=KEY1=VALUE1;KEY2=VALUE2'
--bgp-load-balancer-node-configs 'node-ip=192.168.1.1,labels=KEY3=VALUE3'Use quote around the flag value to escape semicolon in the terminal.
This flag argument must be specified if any of the other arguments in this group are specified.--bgp-load-balancer-node-labels=[KEY=VALUE,…]--bgp-load-balancer-node-taints=[KEY=VALUE:EFFECT,…]--bgp-load-balancer-registry-burst=BGP_LOAD_BALANCER_REGISTRY_BURST--bgp-load-balancer-registry-pull-qps=BGP_LOAD_BALANCER_REGISTRY_PULL_QPS--disable-bgp-load-balancer-serialize-image-pulls--metal-lb-address-pools=[addresses=ADDRESSES],[avoid-buggy-ips=AVOID-BUGGY-IPS],[manual-assign=MANUAL-ASSIGN],[pool=POOL]Examples:
To specify MetalLB load balancer configurations for two address pools
pool1 and pool2,
gcloud beta container bare-metal clusters create example_cluster
--metal-lb-address-pools 'pool=pool1,avoid-buggy-ips=True,manual-assign=True,addresses=192.168.1.1/32;192.168.1.2-192.168.1.3'
--metal-lb-address-pools 'pool=pool2,avoid-buggy-ips=False,manual-assign=False,addresses=192.168.2.1/32;192.168.2.2-192.168.2.3'--metal-lb-load-balancer-node-configs=[labels=LABELS],[node-ip=NODE-IP]--metal-lb-load-balancer-node-labels=[KEY=VALUE,…]--metal-lb-load-balancer-node-taints=[KEY=VALUE:EFFECT,…]--disable-metal-lb-load-balancer-serialize-image-pulls--metal-lb-load-balancer-registry-burst=METAL_LB_LOAD_BALANCER_REGISTRY_BURST--metal-lb-load-balancer-registry-pull-qps=METAL_LB_LOAD_BALANCER_REGISTRY_PULL_QPS--api-server-args=[KEY=VALUE,…]--control-plane-node-configs=[labels=LABELS],[node-ip=NODE-IP]--control-plane-node-labels=[KEY=VALUE,…]--control-plane-node-taints=[KEY=VALUE:EFFECT,…]--control-plane-registry-burst=CONTROL_PLANE_REGISTRY_BURST--control-plane-registry-pull-qps=CONTROL_PLANE_REGISTRY_PULL_QPS--disable-control-plane-serialize-image-pulls--lvp-node-mounts-config-path=LVP_NODE_MOUNTS_CONFIG_PATH--lvp-node-mounts-config-storage-class=LVP_NODE_MOUNTS_CONFIG_STORAGE_CLASS--shared-path-pv-count=SHARED_PATH_PV_COUNT--lvp-share-path=LVP_SHARE_PATH--lvp-share-storage-class=LVP_SHARE_STORAGE_CLASS--admin-users=ADMIN_USERS--annotations=[KEY=VALUE,…]--async--binauthz-evaluation-mode=BINAUTHZ_EVALUATION_MODEBINAUTHZ_EVALUATION_MODE must be one of:
DISABLED, PROJECT_SINGLETON_POLICY_ENFORCE.
--description=DESCRIPTION--enable-application-logs--login-user=LOGIN_USER--maintenance-address-cidr-blocks=[MAINTENANCE_ADDRESS_CIDR_BLOCKS,…]--validate-only--container-runtime=CONTAINER_RUNTIME--max-pods-per-node=MAX_PODS_PER_NODE--enable-advanced-networking--enable-multi-nic-config--enable-sr-iov-config--island-mode-pod-address-cidr-blocks=POD_ADDRESS,[POD_ADDRESS,…]--island-mode-service-address-cidr-blocks=SERVICE_ADDRESS,[…]--uri=URI--no-proxy=[NO_PROXY,…]--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 container bare-metal clusters creategcloud alpha container bare-metal clusters 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.