2V0-71-21 practice question 13 of 15

Which command is used to upgrade a Tanzu Kubernetes Grid Cluster (TKG) to a different kubernetes version?

Full set: 55 questions
Answer options
A: tkg cluster upgrade --k8s-version
B: tkg upgrade cluster --kubernetes-version Correct answer
C: tkg cluster upgrade --kubernetes-version
D: tkg upgrade cluster --version
Correct Answer:
B. tkg upgrade cluster --kubernetes-version
Explanation

The correct command to upgrade a Tanzu Kubernetes Grid (TKG) workload cluster is tkg upgrade cluster. This command initiates the upgrade process for the specified cluster. To target a specific Kubernetes release, the --kubernetes-version flag is used, followed by the desired version string (e.g., v1.23.8---vmware.1-tkg.1). The command first upgrades the control plane nodes and then proceeds to upgrade the worker nodes, ensuring a controlled and sequential update of the cluster's Kubernetes version.

Why Incorrect

A. tkg cluster upgrade is an incorrect command structure. The correct verb is upgrade, and the object is cluster. Also, --k8s-version is not a valid flag.
C. tkg cluster upgrade uses an incorrect command structure. The command for upgrading a cluster is tkg upgrade cluster.
D. The --version flag is generally used to check the version of the tkg CLI tool itself, not to specify the target Kubernetes version for a cluster upgrade.

References

1. VMware Tanzu Kubernetes Grid 1.6 Documentation

"Upgrade TKG Clusters". This official documentation explicitly states the command syntax: tkg upgrade cluster CLUSTER-NAME [FLAGS]. It lists the --kubernetes-version flag with the description: "The Kubernetes version to upgrade to."

Section: "Upgrade TKG Clusters"

2. VMware Tanzu CLI v0.90.1 Command Reference

"tkg upgrade cluster". This reference guide details the command usage and flags. It confirms the syntax tkg upgrade cluster [cluster-name] and lists --kubernetes-version as the flag to specify the "Kubernetes version to upgrade to."

Section: "tkg upgrade cluster"

3. VMware Tanzu Kubernetes Grid 2.1 Documentation

"Upgrade Workload Clusters". The documentation for newer versions also confirms the command structure. It provides the example: tkg cluster upgrade CLUSTER-NAME --kubernetes-version VERSION. Note: In TKG 2.x

the command alias tkg cluster upgrade was introduced

but tkg upgrade cluster remains the primary and backward-compatible command. However

the flag remains --kubernetes-version

making options A and D incorrect regardless. The question context aligns with the more established tkg upgrade cluster syntax.

Section: "Upgrade a Workload Cluster"

Scroll to Top