Objective
This guide documents how to install Tanzu Kubernetes Grid on your Hosted Private Cloud powered by VMware cluster.
Introduction
VMware Tanzu Kubernetes Grid is a Kubernetes platform provided by VMware and maintained as part of the Hosted Private Cloud powered by VMware solution.
You can install this product on your OVHcloud infrastructure to take advantage of its features and scalability.
Requirements
- Being an administrative contact of your Hosted Private Cloud infrastructure to receive login credentials
- A user account with access to the OVHcloud Control Panel
- A user account with access to vSphere
- A VLAN with internet access and a DHCP server
- You must have these resources:
- 8 GB of memory, 4 vCPUs, and 250 GB of storage for the management virtual machine named Bootstrap.
- 16 GB of memory, 4 vCPU, 40 GB of storage per Kubernetes node (it takes 6 nodes to install the management cluster in production mode and 6 nodes per Workload cluster in the same mode).
Instructions
We will install VMware Tanzu Kubernetes Grid on a Hosted Private Cloud powered by VMware cluster and use VLAN 10 with these settings:
-
LAN:
192.168.0.0/24
. -
DHCPRange:
192.168.0.50 -> 192.168.0.100
. -
Gateway:
192.168.0.254
.
At the end of the installation, seven additional virtual machines will be on your VMware cluster, six for running the TKG management cluster and one for managing it.
Importing OVA model for Tanzu KUBERNETES Grid into your infrastructure
VMware provides a virtual machine as an OVA template, which contains all the elements to run a node of the Tanzu Kubernetes Grid cluster. This virtual machine is available in OVH Templates.
Log into the OVHcloud homepage for your VMware cluster, and click OVH Templates
to the right.
In the Select a template window, choose the fourth template from the top that has this information:
- Family: Linux
- Distribution: not specified
- Version: 3
Click the Copy
icon to the right to copy the URL which name must end in photon-3-kube-v1.23.8+vmware.1.ovf. Then click Close
.
Log in to your vSphere console, right-click your cluster and choose Deploy an OVF Template
.
Select URL
, paste the previously copied URL and click NEXT
.
Leave the default location and click NEXT
.
Choose the cluster and click NEXT
.
Review your information and click NEXT
.
Check I accept all licence agreements
and click NEXT
.
Select a shared storage in NFSv3, then click NEXT
.
Choose the destination network on VLAN 10
and click NEXT
.
Click FINISH
.
Select the Monitor
tab and click Tasks
.
Wait for the Deploy OVF template
and Import OVF package
tasks to complete.
Right-click the deployed VM and choose Convert to Template
from the Template
menu.
Answer YES
to convert the virtual machine.
Go to Virtual Machines (and templates)
to see the template you have created.
Installation of the virtual machine Bootstrap provided by OVHcloud
This virtual machine was created by OVHcloud from the documentation Installing the CLI tool manually for deploying Tanzu Kubernetes GRID. It is available as a template in OVH Templates.
Log into the OVHcloud homepage for your VMware cluster, and click OVH Templates
to the right.
In the Select a template window, choose the third template from the top that contains this information:
- Family: Linux
- Distribution: Ubuntu
- Version: 22
Click the Copy
icon to the right to copy the URL, the URL should end with Ubuntu-22.04_TKGm-1.6_with_x.ovf. Then click Close
.
In the vSphere interface, right-click the cluster and choose Deploy an OVF Template
from the menu.
Select URL
, paste the previously copied URL and click NEXT
.
Leave the default positioning and click NEXT
.
Leave Cluster1
and click NEXT
.
Click NEXT
to validate your choices.
Select a shared storage in NFSv3 and click NEXT
.
Choose VLAN10
for the destination network and click NEXT
.
Add this information in Networking:
-
Hostname:
bootstrap
-
IPAddress:
192.168.0.199
-
NetworkCIDRPrefix:
24
-
Gateway:
192.168.0.254
-
DNS:
213.186.33.99
Enter and confirm the password in OS Credentials and click NEXT
.
Click FINISH
.
Right-click the virtual machine you created, go to Power
and click Power On
.
The booted virtual machine can be accessed via the console with the graphical interface or via SSH.
Go to the virtual machine you have created, and click LAUNCH WEB CONSOLE
.
The graphical interface for the Linux virtual machine is then available.
Allowing access to the PCC cluster from the Bootstrap virtual machine
The configuration and administration tools for Tanzu Kubernetes Grid are installed on the Bootstrap virtual machine. This virtual machine must be able to connect to the Internet and to the vSphere cluster.
Write down the public IP address you use on this virtual machine and use this guide Authorize IP addresses to connect to vCenter to grant access to the vSphere cluster to the new virtual machine.
Deploying the Tanzu Kubernetes Grid cluster on your infrastructure
Log in to the Ubuntu-22.04_TKGm-1.5.4_with_x
virtual machine, open a terminal, and run this command to create an RSA key:
ssh-keygen -t rsa -b 4096 -C "youremail@yourdomain.com"
Two files are created in the ~/.ssh folder:
- id_rsa.pub
- id_rsa
Stay on the console and run this command:
tanzu management-cluster create --ui --bind 192.168.0.199:8080
https://192.168.0.199:8080
. If you have run this command from an SSH connection, you will need to connect to https://192.168.0.199:8080
from a virtual machine on the same network with a graphical interface and an operational web browser.Click Deploy
below VMware vSphere.
Enter this information:
-
VCENTER SERVER:
VMware cluster FQDN
-
USERNAME:
VMware cluster user
-
PASSWORD:
VMware cluster user password
Then click CONNECT
.
At the verification step of the SSL Thumbprint, click CONTINUE
.
Click the cross in the top right to close the vSphere 7.0.3 Environment Detected window.
Paste the contents of the ~.ssh/id_rsa.pub file into SSH PUBLIC KEY and click NEXT
.
Select Production
on the right and select the large etc...
INSTANCE TYPE.
Enter these values:
-
MANAGEMENT CLUSTER NAME (OPTIONAL):
tkgm-management-cluster
. -
CONTROL PLANE ENDPOINT:
192.168.0.10
.
Click NEXT
to proceed to the next step.
Click NEXT
.
In the Metadata option and then in the LABELS (OPTIONAL) section, type tkgm
for the name and its value.
Click NEXT
.
Enter these options:
-
VM FOLDER:
Storage folder for virtual machines
. -
DATASTORE:
Storage of virtual machines to be placed on a shared storage
. -
CLUSTERS, HOSTS, AND RESOURCE POOLS:
Cluster1
.
Click NEXT
.
In NETWORK NAME select VLAN10
.
Click NEXT
.
Disable the Activate Identity Management Settings
option and click NEXT
.
Select the OVA image integrated into the photon-3-kube-v1.22.9+vmware.1
cluster from the OS Image menu and click NEXT
.
Uncheck Participate in the Customer Experience Improvement Program
and click NEXT
.
Click REVIEW CONFIGURATION
.
Scroll through the window and click DEPLOY MANAGEMENT CLUSTER
.
The Tanzu Kubernetes Grid cluster deployment is started, please wait for it to complete.
Another indication that the installation is complete can be found in the console of the Bootstrap virtual machine in which will appear the Management cluster created and You can now create your first workload cluster etc… messages.
/home/tanzu/.config/tanzu/tkg/clusterconfigs
folder, it will be used to create a configuration file for installing a WorkLoad cluster.Go to the vCenter interface to see the seven virtual machines created.