3.5 - Lab 6¶
Objectives and Tasks¶
- Examine the Tanzu Kubernetes Cluster
- Scale the Tanzu Kubernetes Cluster
Examine the Tanzu Kubernetes Cluster¶
-
Using the terminal, retrieve the admin kubeconfig file for the workload cluster.
tanzu cluster kubeconfig get tkc-01 --admin -
List the kubectl contexts.
kubectl config get-contexts -
Set the kubectl context to point to the workload cluster.
kubectl config use-context tkc-01-admin@tkc-01 -
Display all pods running on the cluster.
kubectl get pods -AThe status of some
pinniped-post-deploy-jobpods might display as error, which is expected. -
Display the Tanzu Kubernetes cluster nodes.
kubectl get nodesThe output displays the following two nodes.
-
In the vSphere Client, click Menu.
- Click Hosts and Clusters.
-
Review the VM names in the
rp-tkg-productionresource pool.The VM names correspond to the node names in the
kubectl get nodesoutput.
Scale the Cluster¶
-
Using the terminal, get the Tanzu Kubernetes cluster information.
tanzu cluster listThe output shows
WORKERS 1/1. -
Scale the worker nodes to 2.
tanzu cluster scale tkc-01 -w 2The scale operation performs in the background.
-
Verify the status of the scale operation.
tanzu cluster listThe output displays
STATUS updatingandWORKERS 1/2. -
Set the kubectl context to point to the management cluster.
kubectl config use-context sa-compute-01-mgmt-admin@sa-compute-01-mgmt -
Monitor the cluster API resources.
-
Get the VM status.
watch kubectl get machines -
Wait for the new VM phase to go from Provisioning to Running before continuing.
- Press Ctrl+C to exit the
watchcommand. - Verify the status of the scale operation again.
tanzu cluster listThe output displays
STATUS runningandWORKERS 2/2.Provisioning can take up to 10 minutes to complete.
-