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 -A
The status of some
pinniped-post-deploy-job
pods might display as error, which is expected. -
Display the Tanzu Kubernetes cluster nodes.
kubectl get nodes
The output displays the following two nodes.
-
In the vSphere Client, click Menu.
- Click Hosts and Clusters.
-
Review the VM names in the
rp-tkg-production
resource pool.The VM names correspond to the node names in the
kubectl get nodes
output.
Scale the Cluster¶
-
Using the terminal, get the Tanzu Kubernetes cluster information.
tanzu cluster list
The output shows
WORKERS 1/1
. -
Scale the worker nodes to 2.
tanzu cluster scale tkc-01 -w 2
The scale operation performs in the background.
-
Verify the status of the scale operation.
tanzu cluster list
The output displays
STATUS updating
andWORKERS 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
watch
command. - Verify the status of the scale operation again.
tanzu cluster list
The output displays
STATUS running
andWORKERS 2/2
.Provisioning can take up to 10 minutes to complete.
-