TKG Series
- [TKG Series – Part 1] VMware Tanzu Kubernetes Grid introduction and installation
- [TKG Series – Part 2] Install Kubernetes Cluster(s) using Tanzu Kubernetes Grid
- [TKG Series – Part 3] Creating custom plan in Tanzu Kubernetes Grid
For this post, I’ll be showing how to create custom plan that can be used when provisioning kubernetes clusters using tkg. Plan is used to define specifics of the provisioning including configuration resources of the deployed VM/ nodes. By default, tkg uses the same machine configuration (cpu/mem/target datastore) that was used for the tkg management plane for the succeeding kubernetes cluster(s). Adding a custom plan is necessary if you want to scale or specify this aspects of the deployed kubernetes cluster(s)
Location of tkg plan
By default, it’s located inside .tkg folder where you initiated the tkg management install. In my previous example, is at the control vm.
/root/.tkg/providers/infrastructure-vsphere/v0.6.3
Creating custom Plan
- Copy the out-of-the-box plan
cp cluster-template-prod.yaml cluster-template-sample.yaml
- Modify the custom plan you just created using your favorite text editor
- For this plan, I’ll modify the master and worker node resource configuration.
- To specify worker nodes resources, go to the VSphereMachineTemplate kind and modify the resource
- To specify master nodes resources, copy the VSphereMachineTemplate kind and create one just for master. Change the name to identify it’s for master node
- Next, to specify master nodes will be using the previous template, go to kind: KubeadmControlPlane and specify the infrastructureTemplate to use
- …and you’re all set
Creating custom Plan
To use the plan, just specify the plan when creating the kubernetes cluster using the tkg cli
tkg create cluster helloworld --plan sample --kubernetes-version v1.17.3+vmware.2 --controlplane-machine-count 1 --worker-machine-count 1
Pingback: A private cloud – all for myself » [TKG Series – Part 2] Install Kubernetes Cluster(s) using Tanzu Kubernetes Grid
Pingback: Insecure Harbor registry with Tanzu Kubernetes Grid+ on vSphere – beepboop computer