After the easy setup of TCE (see my blogpost here) it’s time to deploy a simple small development Tanzu Standalone Cluster on vSphere. Let’s do this!
My Setup looks as follows:
- vCenter 7.0.2
- Intel NUC NUC10i5FNH ESXi 7.0.1 with 8 Logical CPUs & 32 GB RAM
- MacBook Pro (x86; not M1) as Bootstrap Machine
- Docker Desktop on your Bootstrap Machine
Note: Docker Desktop 4.3.0 uses cgroupsv2, this introduces limitations when the Tanzu CLI creates the Bootstrap Cluster. See this article on our blog to workaround it if needed.
- kubectl installed on your Bootstrap Machine
- TCE installed on your Bootstrap Machine; see how to install it here.
- SSH Key-Pair generated, Public SSH Key ready (needed for authentication from your Machine to the Control Plane and Worker Nodes- click here to see how to authenticate against TKG/TCE Nodes)
The latest official TCE Documentation can be found here.
Before we can deploy Tanzu Management or Workload Clusters on our vSphere environment, we need to have the necessary vSphere Templates in place in your vCenter.
Those vSphere Templates will be used by Tanzu to create Tanzu Management / Workload Clusters from. Basically each Node in your Tanzu Cluster is a VM (from those vSphere Templates).
Simply browse to the Tanzu Community Edition Product Page on Customer Connect and download the latest TKG OVA for your desired Operation System and Kubernetes Version:
In my Environment I chose for ‘photon-3-kube-v1.21.2+vmware.1……’.
Once you have downloaded the OVA, go to your vCenter and right-click ‘Deploy OVF’ and complete the details as shown below:
Click ‘Finish‘ to deploy the TKG OVA in your vSphere Environment.
Afterwards locate your newly deployed VM and ‘right-click – Template – Convert to Template‘ as shown below:
Now you have successfully created the necessary vSphere Template. Please also keep your Public Key ready for SSH Authentication to the Worker and Control Plane Nodes in the TCE Cluster.
Time to deploy a TCE Cluster!
Deploy a TCE Standalone Cluster on vSphere
So we’re all set to deploy our first small Standalone Cluster on vSphere using TCE.
My Network Setup will look as follows for this TCE Cluster:
- Using Kubevip as Load Balancing Method, not my NSX Advanced Load Balancer (AVI)
- The Network for my Kube-Vip Load Balancer & Kubernetes Nodes is 10.10.70.1/24 (vSphere Network Name: AVI – TKGS 70)
Open your favourite terminal and run the following command:
tanzu standalone-cluster create --ui
This should launch the Tanzu Community Edition Installer. On that page, select ‘VMware vSphere’:
Fill in the required details as illustrated in the screenshots below:
A couple of remarks:
- I won’t be using my NSX Advanced Load Balancer (AVI) for this setup so I selected ‘Kube-Vip’ and provided an IP Address outside of my DHCP Scope
- I did not configure any Authentication, so I skipped this part
- For my ‘Kubernetes Network Settings’ I used a Network that has DHCP Enabled
Now sit back, relax and let your Standalone Cluster be deployed.
Note: If you are running Docker Desktop 4.30 on Mac, you might encounter the following error when Tanzu tries to deploy the Bootstrap Cluster:
Error: unable to set up management cluster: unable to create bootstrap cluster: failed to create kind cluster tkg-kind-c6nn3ndmk1u63k77o6b0: failed to init node with kubeadm: command “docker exec –privileged tkg-kind-c6nn3ndmk1u63k77o6b0-control-plane kubeadm init –skip-phases=preflight –config=/kind/kubeadm.conf –skip-token-print –v=6” failed with error: exit status 1
Check out my other blogpost to bypass this issue.
If you have any questions or encountered any issue, don’t hesitate to let us know!
Have a nice day!
One thought on “TCE – How to deploy a Standalone Cluster on vSphere 7”