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 using the \u003ccode\u003egcloud container vmware clusters create\u003c/code\u003e command to create user clusters with different configurations.\u003c/p\u003e\n"],["\u003cp\u003eExamples are provided using DHCP or static IPs for node addressing, and can be used with a MetalLB, F5, or manual load balancer.\u003c/p\u003e\n"],["\u003cp\u003eAfter creating a user cluster, a node pool must be created using the \u003ccode\u003egcloud container vmware node-pools create\u003c/code\u003e command, as shown in the final example.\u003c/p\u003e\n"],["\u003cp\u003eThe examples use default settings for the control plane, so those flags are not included in the command.\u003c/p\u003e\n"],["\u003cp\u003eIt is important to replace the provided IP addresses and CIDR ranges in the examples with values that match your network, as detailed in the "Plan your IP addresses" section.\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.16/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.16/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.16.7-gke.46 \\\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.16/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.16.7-gke.46 \\\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.16/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.16/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.16.7-gke.46 \\\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.16.7-gke.46 \\\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.16/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.16/how-to/create-user-cluster-api#create_a_user_cluster)\n- [The gcloud CLI reference](/sdk/gcloud/reference/beta/container/vmware)"]]