This topic describes how to use the Tanzu Kubernetes Grid installer interface to deploy a management cluster to a vSphere instance. The Tanzu Kubernetes Grid installer interface guides you through the deployment of the management cluster, and provides different configurations for you to select or reconfigure.
Make sure that you have met the all of the requirements listed in Set Up the Bootstrap Environment for Tanzu Kubernetes Grid and Prepare to Deploy the Management Cluster to vSphere.
Do not run multiple management cluster deployments on the same bootstrap environment machine at the same time. Do not change context or edit the
kubeconfig file while Tanzu Kubernetes Grid operations are running.
Tanzu Kubernetes Grid does not support IPv6 addresses. This is because upstream Kubernetes only provides alpha support for IPv6. Always provide IPv4 addresses in the procedures in this topic.
On the machine on which you downloaded and installed the Tanzu Kubernetes Grid CLI, run the
tkg init command with the
tkg init --ui
By default Tanzu Kubernetes Grid creates a folder called
$HOME/.tkg and creates the cluster configuration file,
config.yaml in that folder. To create
config.yaml in a different location or with a different name, specify the
--config option. If you specify the
--config option, Tanzu Kubernetes Grid only creates the YAML file in the specified location. Other files are still created in the
tkg init --ui --config=/path/my-config.yaml
When you run the
tkg init --ui command, it validates that your system meets the prerequisites then opens http://127.0.0.1:8080 in your default browser to display the Tanzu Kubernetes Grid installer interface.
Click the Deploy On vSphere button.
Enter the vCenter Single Sign On username and password for a user account that has vSphere administrator permissions, and click Connect.
Select the datacenter in which to deploy the management cluster from the Datacenter drop-down menu.
Paste the contents of your SSH public key into the text box and click Next.
In the Control Plane Settings section, select the Development or Production tile.
In either of the Development or Production tiles, use the Instance type drop-down menu to select from different combinations of CPU, RAM, and storage for the control plane node VM or VMs.
Choose the configuration for the control plane node VMs depending on the expected CPU, memory, and storage consumption of the workloads that it will run. For example, some workloads might require a large compute capacity but relatively little storage, while others might require a large amount of storage and less compute capacity. The instance type that you select applies to the management cluster itself and to the Tanzu Kubernetes clusters that you deploy from it.
Use the API Server Load Balancer drop-down menu to select the VM template for the API Server Load Balancer.
The drop-down menu includes VM templates that are present in your vSphere instance that meet the criteria for use as API Server Load Balancer VMs. If you have not already imported a suitable VM template to vSphere, you can do so now without quitting the installer, and then use the Refresh button to make it available in the drop-down menu.
Optionally enter a name for your management cluster and click Next.
If you do not specify a name, Tanzu Kubernetes Grid automatically generates a unique name.
In the Resources section, select vSphere resources for the management cluster to use, and click Next.
If appropriate resources do not already exist in vSphere, without quitting the Tanzu Kubernetes Grid installer, go to vSphere to create them. Then click the refresh button so that the new resources appear in the drop-down menus.
In the Kubernetes Network section, configure the networking for Kubernetes services, and click Next.
In the OS Image section, use the drop-down menu to select the OS image template to use for deploying Tanzu Kubernetes Grid VMs, and click Next.
The drop-down menu includes all of the OS image templates that are present in your vSphere instance that meet the criteria for use as Tanzu Kubernetes Grid base OS images. The OS image template must include the correct version of Kubernetes for this release of Tanzu Kubernetes Grid. If you have not already imported a suitable OS image template to vSphere, you can do so now without quitting the Tanzu Kubernetes Grid installer. After you import it, use the Refresh button to make it available in the drop-down menu.
Click Review Configuration to see the details of the management cluster that you have configured.
(Optional) Click Edit Configuration to return to the installer wizard to modify your configuration.
Click Deploy Management Cluster.
Deployment of the management cluster can take several minutes. The first run of
tkg init takes longer than subsequent runs because it has to pull the required Docker images into the image store on your bootstrap environment. Subsequent runs do not require this step, so are faster. You can follow the progress of the deployment of the management cluster in the installer interface or in the terminal in which you ran
tkg init --ui.
For information about what happened during the deployment of the management cluster, how to connect
kubectl to the management cluster, and how to create namespaces, see Examine the Management Cluster Deployment.