Today, we will deploy VMware Tanzu Kubernetes Grid on OVH Private Cloud. This a step-by-step to figure out how to do it and why.
Firstly, we need a "Naked cPod" for TKG. A "Naked cPod" is a cPod with netheir ESXi nor vCenter. Only the network stuff will be deployed, i.e. the cPodRouter. The main advantage is that our lab will run natively on PCC (not in nested ESX) but with cPod advanced networking, i.e. Broadcast Domain (L2) + DHCP + DNS + NTP + BGP routing and eventually a NFS share.
We got this in vCenter : a "cPod-TKG" RessourcePool and a "cpod-tkg" portgroup:
cPod in ResourcePool are limited with 96Gb of Memory
I have created a directory in Forty-Two (jumpbox VM) "/data/BITS/TKG" with two OVAs one for HAProxy and one for kubernetes nodes. You have to download these files if you want to replicate this how-to:
I recommend to have at least - 8Gb of memory / 2 vCPUs - for your jump box because it will host a KinD (Kubernetes in Docker) cluster to bootstap TKG.
I have simplified cPod preparation with a bunch of script in my repo https://github.com/bdereims/koulpe. Git clone it and go to tkg directory. Now, you have to copy "env-example" in "env" and adapt to your PCC. The jump box need clean docker engine without remaining neither container images nor volumes to be sure to see latest release of tkg.
In short, TKG need a local kube cluster in the jump box, next it will deploy the management cluster in PCC and finally allow you to deploy workload clusters... Not so complex, you will understand it well after your first deployment.
Update yhe "env" file decribing your env, pretty obvious. Don't forget to update the password file. Then launch "1-prepare-vcsa.sh", it will do for you:
- Create a VM directory in VCSA
- Import OVAs with the right PortGroup, make a snapshot for linked clone and transform them into templates
Now execute the tkg cli : "tkg init --ui -v 6" and connect your browser on the provided url. Personally I do that with redirection on my laptop: "ssh -L 8080:127.0.0.1:8080 email@example.com"
The UI is neat and simple to fill in:
Now it's time to cluster our first workload cluster executing "3-create-cluster.sh" and you will get something like this:
And finally play with dev-cluster:
In conclusion, TKG in PCC is very fast to deploy and to maintain. It gives us the cluster-as-a-service experience with open source kubernetes cluster. I will post later some use cases based on this.