Now that the home lab is up&running I wanted to gain some experience with Kubernetes on the VMware platform. For this I completed the vSphere with Tanzu Quickstart Guide V1a.
The guide can be found via the link below:
I have just followed this quick start.
Some settings I have used:
- Kept the default VM Network switch for the management network.
- Created a distributed switch for the workload network
- Management network: 10.0.1.0
- Supervisor cluster (5 IPs): 10.0.1.60 (starting IP)
- Workload network: 10.0.2.0
- Workload network loadbalancer IP: 10.0.2.31
- Workload network IP address range: 10.0.20./27 (10.0.2.3 – 10.0.2.30)
- Load balancer IP range: 10.0.2.32/27 (10.0.2.33 – 10.0.2.62)
- HAProxy version: v0.1.10 (the 0.2.0 version did not work).
After Tanzu is running you can login with:
kubectl vsphere login --server=https://10.0.2.34 --vsphere-username email@example.com --insecure-skip-tls-verify kubectl config get-contexts kubectl config use-context namespace01
After this is working it is time to deploy a workload on the Tanzu Kubernetes cluster. For this I followed the vSphere with Tanzu Quick Start Demo from the begin until the end. It can be found at:
- The name of the storage policy in vCenter must be the same as used in the StorageClass Kubernetes tkc.yaml file.
“Storage policies visible to a vSphere Namespace determine which datastores the namespace can access and use for persistent volumes. The storage policies appear as matching Kubernetes storage classes in the namespace. They are also propagated to the Tanzu Kubernetes cluster on this namespace.”
- All the kubectl commands were performed in a Linux terminal. Not everything worked well in a Windows command terminal.
tkc.yaml file to create the Kubernetes cluster.
apiVersion: run.tanzu.vmware.com/v1alpha1 kind: TanzuKubernetesCluster metadata: name: tkc-1 spec: distribution: version: v1.18 topology: controlPlane: class: guaranteed-small count: 1 storageClass: kubernetes-demo-storage workers: class: guaranteed-small count: 1 storageClass: kubernetes-demo-storage settings: storage: classes: ["kubernetes-demo-storage"] #Named PVC storage classes defaultClass: kubernetes-demo-storage #Default PVC storage class
Some screenshots from vCenter.