When attempting to upgrade a Tanzu Kubernetes Grid (TKG) workload cluster using a specific Tanzu Kubernetes Release (TKR), the upgrade fails with an error indicating that no compatible TKR was found matching the specified TKR name or prefix. The error may look similar to the following:
Error: cluster cannot be upgraded, no compatible upgrades found matching the TKR name/prefix ‘v1.28.11—vmware.2-tkg.2’, available compatible upgrades [v1.30.2—vmware.1-tkg.1]
This occurs even though the target TKR appears in the output of tanzu kubernetes-release get and is marked as compatible and active. Upon further inspection, the cluster may be running a different Kubernetes version (e.g., v1.28.7) while its tanzuKubernetesRelease label may reference a different TKR entirely (e.g., v1.29.6---vmware.1-tkg.3).
This issue typically occurs when there is a mismatch between the actual Kubernetes version running on the cluster and the tanzuKubernetesRelease label applied to the cluster object. The label may have been set during a previous upgrade attempt or manually edited, and it no longer reflects the cluster’s real state.
The upgrade controller uses the TKR label to determine upgrade paths. If the label does not match the current version running in the cluster, no valid upgrade path can be resolved, even if a compatible target TKR is available.
In some cases, the mismatch may also occur if the TKR OVA associated with a referenced version (e.g., v1.29.6) is missing from vCenter, causing upgrades to fail.
kubectl get nodeskubectl get cluster <cluster> -n <namespace> --show-labelsanzu kubernetes-release getkubectl label cluster <cluster> -n <namespace> tanzuKubernetesRelease= --overwitekubectl label cluster <cluster> -n <namespace> tanzuKubernetesRelease=v1.28.7—vmware.1-tkg.1 --overwrite tanzu cluster available-upgrades get <cluster_name>Notes: