This document shows how to create an admin cluster for Anthos clusters on VMware (GKE on-prem).
The instructions here are part of a quickstart. For full instructions on how to create an admin cluster, see Creating an admin cluster.
Before you begin
Get an SSH connection to your admin workstation
Get an SSH connection to your admin workstation.
gkeadm activated your
component access service account on the admin workstation.
Do all the remaining steps in this topic on your admin workstation in the home directory.
Specify static IPs for your admin cluster
To specify the static IP addresses that you want to use for your admin cluster,
IP block file
You need five IP addresses for the following nodes in your admin cluster:
Three nodes to run the admin cluster control plane and add-ons
An additional node to be used temporarily during upgrades
One node to run the control plane for the user cluster that you will create later
Here is an example of an IP block file with five hosts:
blocks: - netmask: 255.255.252.0 gateway: 172.16.23.254 ips: - ip: 172.16.20.10 hostname: admin-host1 - ip: 172.16.20.11 hostname: admin-host2 - ip: 172.16.20.12 hostname: admin-host3 - ip: 172.16.20.13 hostname: admin-host4 - ip: 172.16.20.14 hostname: admin-host5
ips field is an array of IP addresses and hostnames. These are the IP
addresses and hostnames that Anthos clusters on VMware will assign to
your admin cluster nodes.
In the IP block file, you also specify a subnet mask and a default gateway for the admin cluster nodes.
Credentials configuration file
When you used
gkeadm to create your admin workstation, you filled in a
credentials configuration file named
credential.yaml. This file holds the
username and password for your vCenter server.
Admin cluster configuration file
gkeadm created your admin workstation, it generated a configuration file
admin-cluster.yaml. This configuration file is for creating your admin
Fill in your admin cluster configuration file
Several fields in your admin cluster configuration file are already filled in with default values, generated values, or values that you provided when you created your admin workstation. You can leave those fields unchanged.
Fill in the following fields. For instructions on how to fill in the fields, see Admin cluster configuration file.
vCenter: dataDisk: "Fill in" network: hostConfig: dnsServers: - "Fill in" ntpServers: - "Fill in" searchDomainsForDNS: - "Fill in (optional)" ipMode: type: Fill in. Set to "static". ipBlockFilePath: "Fill in" loadBalancer: vips: controlPlaneVIP: "Fill in" seesaw: ipBlockFilePath: "Fill in" vrid: Fill in masterIP: "Fill in"
Validate the admin cluster configuration file
Verify that the your admin cluster configuration file is valid and can be used for cluster creation:
gkectl check-config --config admin-cluster.yaml
Prepare your vSphere environment
gkectl prepare to initialize your vSphere environment:
gkectl prepare --config admin-cluster.yaml
Create a load balancer for your admin cluster
Create and configure the VM for your Seesaw load balancer:
gkectl create loadbalancer --config admin-cluster.yaml
Create the admin cluster
Create the admin cluster:
gkectl create admin --config admin-cluster.yaml
Locate the admin cluster kubeconfig file
gkectl create admin command creates a kubeconfig file named
kubeconfig in the current directory. You will need this kubeconfig file
later to interact with your admin cluster.
Verify that your admin cluster is running
Verify that your admin cluster is running:
kubectl get nodes --kubeconfig kubeconfig
The output shows the admin cluster nodes. For example:
gke-admin-master-hdn4z Ready control-plane,master ... gke-admin-node-7f46cc8c47-g7w2c Ready ... gke-admin-node-7f46cc8c47-kwlrs Ready ...