This document describes the planning process and the steps for installing Anthos clusters on VMware (GKE on VMware). This is a multi-stage process, during which you need to make decisions about the type of configuration that will meet your organizational needs. You might need to get help from others, such as your network administrator, to set up a vSphere infrastructure and provide you with information you need to complete configuration files.
Before you begin
Before you read this document, you should be familiar with the following:
Overview of installation steps
These are the primary steps involved in an installation of Anthos clusters on VMware:
Plan your installation.
Set up your vSphere environment.
Set up Cloud resources, including a Google Cloud project and a service account.
Create an admin workstation. The admin workstation is a VM that has the tools you need to create clusters.
From your admin workstation, create an admin cluster. An admin cluster is a point of management for a set of user clusters that run your workloads.
Create one or more user clusters.
Deploy a workload on a user cluster.
1. Plan your installation
Your workloads run on user clusters, and user clusters are managed by an admin cluster. The following diagram shows an admin cluster that manages two user clusters. User cluster 1 has four nodes, and user cluster 2 has five nodes.
The preceding diagram illustrates these points:
Each node in a user cluster is called a worker node.
The Kubernetes control-plane components for a user cluster run on a node in the admin cluster.
The admin workstation is a VM that is separate from the clusters.
The admin workstation is where you run the
gkectlcommand-line tool to create and manage clusters. This is also where you run the
kubectlcommand-line tool to manage workloads on your user clusters.
Plan your user clusters
Think ahead about how many user clusters you intend to create and how many nodes you want each user cluster to have. For example, you might want to create separate clusters for different departments in your organization. Certain clusters might need to support heavy customer traffic, and other clusters might need to support only light internal traffic.
Think about which of your workloads need to be highly available. Then decide which of your user clusters need to have a high availability (HA) control plane and which clusters would function adequately with a non-HA control plane. An HA control plane requires three nodes in the admin cluster, and a non-HA control plane requires only one node in the admin cluster.
Plan your network and load balancing
Read about the load balancing options for your installation and decide which kind of load balancer would work best for you. Depending on which option you choose, you might have to set up your load balancer before you create your clusters.
Read about the options for connecting to Google, and decide which kind of connection is best for you.
2. Set up your vSphere environment
Obtain the required vSphere licenses.
Set up a physical network that has a machine to run vCenter Server and several machines to run the ESXi hypervisor. Install vCenter Server on a physical machine, and install ESXi on several physical machines. These physical machines are called hosts.
Set up physical storage for your vSphere environment.
Plan your IP addresses
Decide how you want your cluster nodes to get their IP addresses. The options are:
- From a DHCP server that you provide.
- From a list of static IP addresses that you provide.
In either case, ensure that enough IP addresses are available for your cluster nodes and virtual IP addresses (VIPs) that need to be configured on your load balancer. For more information, see Plan your IP addresses.
Set up your vSphere object hierarchy
Use your instance of vCenter Server to create one or more vSphere data centers. Recall that a vSphere data center is not the same as a physical building. Sometimes a vSphere data center is called a virtual data center. Use your instance of vCenter Server to add vSphere inventory objects to your data centers. These inventory objects include cluster, resource pool, network, datastore, and folder.
Using separate vSphere clusters
Think about whether you want your GKE clusters to be in the same vSphere cluster or in separate vSphere clusters. For example, you could have your admin cluster in one vSphere cluster and your user clusters in a different vSphere cluster. Or you could have each user cluster in its own vSphere cluster.
The following diagram illustrates a vSphere setup you could use if you want to put an admin cluster in one vSphere cluster and a user cluster in a different vSphere cluster:
Using separate data centers
Another option is to have your GKE clusters in separate data centers.
The following diagram illustrates a vSphere setup you could use if you want to put an admin cluster in one data center and a user cluster in a different data center:
For more information about setting up your vSphere environment, see:
3. Set up Google Cloud resources
Before you create your admin workstation, you need to install the Google Cloud CLI, create a Google Cloud project, and create a service account. In some cases, you might want to create more than one Google Cloud project and more than one service account. For instructions, see:
Install the Google Cloud CLI. The Google Cloud CLI is a set of tools to create and manage Google Cloud resources.
Create Google Cloud projects A Google Cloud project provides a way of organizing your Google Cloud resources. You must have at least one Google Cloud project. When you create a user cluster, you must register the cluster to a fleet, which requires that you specify a fleet host project.
Create service accounts. Anthos clusters on VMware uses Google Cloud service accounts with specific permissions to download cluster components from Google Cloud, register clusters to a fleet, and perform other tasks.
4. Create an admin workstation
The admin workstation is a VM that you create in your vSphere environment. Then you get an SSH connection to your admin workstation, and from there you run commands to create an admin cluster.
For instructions on how to create an admin workstation, see Create an admin workstation.
5. Create an admin cluster
The admin cluster runs the Kubernetes control plane for itself and any associated user clusters. You must create an admin cluster before you create user clusters to run your workloads. To create an admin cluster, get an SSH connection to your admin workstation, and follow the instructions in Create an admin cluster.
Enroll the cluster in the Anthos On-Prem API
Optionally, enroll your admin cluster in the Anthos On-Prem API. Enrolling your
admin cluster in the Anthos On-Prem API lets you use standard
tools—the Google Cloud console, Google Cloud CLI, or
Terraform—to upgrade user
clusters that the admin cluster manages. The Anthos On-Prem API stores cluster
state metadata in Google Cloud. This metadata lets the API manage the user
cluster lifecycle and doesn't include workload-specific data. The standard
tools use the Anthos On-Prem API to manage the user cluster lifecycle, and
collectively are referred to as the Anthos On-Prem API clients. Enrolling your
admin cluster also lets you run
gcloud commands to
get information about your admin cluster.
Anthos clusters on VMware provides the following ways to enroll your admin cluster in the Anthos On-Prem API:
Before the cluster is created: Include the
gkeOnPremAPIsection in the admin cluster configuration file.
After the cluster is created: Use the gcloud CLI to enroll the cluster.
6. Create user clusters
After you create an admin cluster, you can create one or more user clusters.
You can create user clusters by using standard tools—the
console, gcloud CLI, or Terraform—or by running
gkectl on your admin workstation. For more information about using the
standard tools, see
Choose a tool to manage cluster lifecycle.
To create a user cluster using a standard tool, see Create a user cluster using Anthos On-Prem API clients. When you create a user cluster using a standard tool, the cluster is automatically enrolled in the Anthos On-Prem API.
To create a user cluster using
gkectl, get an SSH connection to your admin workstation, and follow the instructions in Create a user cluster. Optionally, you can enroll your user cluster in the Anthos On-Prem API. Anthos clusters on VMware provides the following ways to enroll your user cluster in the Anthos On-Prem API if you use
gkectlto create the cluster:
7. Deploy a workload on a user cluster
To learn how to create a Deployment, a Service and an Ingress on a user cluster, see:
Start the installation process by setting up your on-premises infrastructure.