This page provides examples of using the command
gcloud container vmware clusters create to create a user cluster.
After creating the user cluster, you need to create at least one node pool.
You can use the command
gcloud container vmware node-pools create to
create a node pool.
All of the examples use the defaults for the
control plane,
so those flags aren't included.
DCHP
This section shows examples of getting IP addresses for you cluster nodes from
a DHCP server.
For a description of the F5 flags, see
Load balancer.
Static IPs
This section provides examples using static IPs for your cluster nodes. A user
cluster needs to have one IP address for each node and an additional IP address
for a temporary node that is needed during cluster upgrades, updates, and
auto repair. For a description of the --static-ip-config-ip-blocks flag
see Networking.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page provides examples of how to create a user cluster using the \u003ccode\u003egcloud container vmware clusters create\u003c/code\u003e command, demonstrating different configurations for networking and load balancing.\u003c/p\u003e\n"],["\u003cp\u003eThe examples cover the use of DHCP for obtaining IP addresses, static IP configurations, and various load balancer setups including MetalLB, F5, and manual options, all showing how to implement them with the \u003ccode\u003egcloud\u003c/code\u003e tool.\u003c/p\u003e\n"],["\u003cp\u003eAfter creating a user cluster, it is necessary to create at least one node pool, which can be done using the \u003ccode\u003egcloud container vmware node-pools create\u003c/code\u003e command, as shown in the provided example.\u003c/p\u003e\n"],["\u003cp\u003eThe examples provided in this document require you to replace the example IP addresses and CIDR ranges with the appropriate values from your own network.\u003c/p\u003e\n"]]],[],null,["# Examples using the gcloud CLI to create a user cluster\n\n\u003cbr /\u003e\n\nThis page provides examples of using the command\n`gcloud container vmware clusters create` to create a user cluster.\nAfter creating the user cluster, you need to create at least one node pool.\nYou can use the command\n`gcloud container vmware node-pools create` to\n[create a node pool](#create_a_node_pool).\n| **Important:** These are examples. You must replace the IP addresses and CIDR ranges with values from your network. See [Plan your IP addresses](/anthos/clusters/docs/on-prem/1.14/how-to/plan-ip-addresses) for more information.\n\nAll of the examples use the defaults for the\n[control plane](/anthos/clusters/docs/on-prem/1.14/how-to/create-user-cluster-api#control_plane),\nso those flags aren't included.\n\nDCHP\n----\n\nThis section shows examples of getting IP addresses for you cluster nodes from\na DHCP server. \n\n### MetalLB\n\n```\ngcloud container vmware clusters create user-cluster-1 \\\n --project=example-project-12345 \\\n --location=us-west1 \\\n --admin-cluster-membership=projects/example-project-12345/locations/global/memberships/admin-cluster-1 \\\n --version=1.14.9-gke.21 \\\n --admin-users=sara@example.com \\\n --admin-users=amal@example.com \\\n --enable-dhcp \\\n --service-address-cidr-blocks=10.96.232.0/24 \\\n --pod-address-cidr-blocks=192.168.0.0/16 \\\n --metal-lb-config-address-pools='pool=lb-pool-1,manual-assign=False,avoid-buggy-ips=True,addresses=10.251.133.0/24;10.251.134.80/32;10.251.134.81/32' \\\n --metal-lb-config-address-pools='pool=lb-pool-2,manual-assign=True,addresses=172.16.20.62/32' \\\n --control-plane-vip=172.16.20.61 \\\n --ingress-vip=172.16.20.62\n```\n\nFor a description of the `--metal-lb-config-address-pools` flag,\nsee [Load balancer](/anthos/clusters/docs/on-prem/1.14/how-to/create-user-cluster-api#load_balancer).\n\n### F5 load balancer\n\n```\ngcloud container vmware clusters create user-cluster-2 \\\n --project=example-project-12345 \\\n --location=us-west1 \\\n --admin-cluster-membership=projects/example-project-12345/locations/global/memberships/admin-cluster-1 \\\n --version=1.14.9-gke.21 \\\n --admin-users=sara@example.com \\\n --admin-users=amal@example.com \\\n --enable-dhcp \\\n --service-address-cidr-blocks=10.96.232.0/24 \\\n --pod-address-cidr-blocks=192.168.0.0/16 \\\n --f5-config-address=203.0.113.2 \\\n --f5-config-partition=my-f5-admin-partition \\\n --control-plane-vip=172.16.20.61 \\\n --ingress-vip=172.16.20.62\n```\n\nFor a description of the F5 flags, see\n[Load balancer](/anthos/clusters/docs/on-prem/1.14/how-to/create-user-cluster-api#load_balancer).\n\nStatic IPs\n----------\n\nThis section provides examples using static IPs for your cluster nodes. A user\ncluster needs to have one IP address for each node and an additional IP address\nfor a temporary node that is needed during cluster upgrades, updates, and\nauto repair. For a description of the `--static-ip-config-ip-blocks` flag\nsee [Networking](/anthos/clusters/docs/on-prem/1.14/how-to/create-user-cluster-api#networking). \n\n### MetalLB\n\n```\ngcloud container vmware clusters create user-cluster-3 \\\n --project=example-project-12345 \\\n --location=europe-west1 \\\n --admin-cluster-membership=projects/example-project-12345/locations/global/memberships/admin-cluster-1 \\\n --version=1.14.9-gke.21 \\\n --admin-users=sara@example.com \\\n --admin-users=amal@example.com \\\n --static-ip-config-ip-blocks='gateway=172.16.23.254,netmask=255.255.252.0,ips=172.16.20.10 user-vm-1;172.16.20.11 user-vm-2' \\\n --static-ip-config-ip-blocks='gateway=172.16.23.255,netmask=255.255.252.0,ips=172.16.20.12 user-vm-3;172.16.20.13 extra-vm' \\\n --dns-servers=203.0.113.1,198.51.100.1 \\\n --dns-search-domains=example.com,altostrat.com \\\n --ntp-servers=216.239.35.4,216.239.35.5 \\\n --service-address-cidr-blocks=10.96.232.0/24 \\\n --pod-address-cidr-blocks=192.168.0.0/16 \\\n --metal-lb-config-address-pools='pool=lb-pool-1,manual-assign=False,avoid-buggy-ips=True,addresses=10.251.133.0/24;10.251.134.80/32;10.251.134.81/32' \\\n --metal-lb-config-address-pools='pool=lb-pool-2,manual-assign=True,addresses=172.16.20.62/32' \\\n --control-plane-vip=172.16.20.61 \\\n --ingress-vip=172.16.20.62\n```\n\n### Manual load balancer\n\n```\ngcloud container vmware clusters create user-cluster-4 \\\n --project=example-project-12345 \\\n --location=asia-east1 \\\n --admin-cluster-membership=projects/example-project-12345/locations/global/memberships/admin-cluster-1 \\\n --version=1.14.9-gke.21 \\\n --admin-users=sara@example.com \\\n --admin-users=amal@example.com \\\n --static-ip-config-ip-blocks='gateway=172.16.23.254,netmask=255.255.252.0,ips=172.16.20.10 user-vm-1;172.16.20.11 user-vm-2' \\\n --static-ip-config-ip-blocks='gateway=172.16.23.255,netmask=255.255.252.0,ips=172.16.20.12 user-vm-3;172.16.20.13 extra-vm' \\\n --dns-servers=203.0.113.1,198.51.100.1 \\\n --ntp-servers=216.239.35.4,216.239.35.5 \\\n --service-address-cidr-blocks=10.96.232.0/24 \\\n --pod-address-cidr-blocks=192.168.0.0/16 \\\n --control-plane-vip=172.16.20.61 \\\n --control-plane-node-port=30968 \\\n --ingress-vip=172.16.20.62 \\\n --ingress-http-node-port=32527 \\\n --ingress-https-node-port=30139 \\\n --konnectivity-server-node-port=30969\n```\n\nCreate a node pool\n------------------\n\nYou can use the following command to create a node pool:\n\n```\ngcloud container vmware node-pools create default-pool \\\n --cluster=user-cluster-1 \\\n --project=example-project-12345 \\\n --location=us-west1 \\\n --image-type=ubuntu_containerd \\\n --boot-disk-size=40 \\\n --cpus=8 \\\n --memory=8192 \\\n --replicas=5 \\\n --min-replicas=5 \\\n --max-replicas=10 \\\n --enable-load-balancer\n \n```\n\nFor descriptions of the flags, see\n[Create a node pool](/anthos/clusters/docs/on-prem/1.14/how-to/create-user-cluster-api#create_the_cluster_and_node_pools).\n\nWhat's next\n-----------\n\n- [Create a user cluster](/anthos/clusters/docs/on-prem/1.14/how-to/create-user-cluster-api#create_a_user_cluster)\n- [The gcloud CLI reference](/sdk/gcloud/reference/beta/container/vmware)"]]