When looking to upgrade a workload cluster in a vSphere Supervisor environment, the desired TKR to upgrade to is not available or not listed under Updates Available.
While connected to the Supervisor cluster context, the following symptoms are observed:
kubectl get tkc -n <cluster namespace>
NAMESPACE NAME CONTROL PLANE WORKER TKR NAME AGE READY TKR COMPATIBLE UPDATES AVAILABLE
<cluster namespace> <cluster name a> # # <TKR.VERSION.A> ###d True True [<TKR.VERSION.B> <TKR.VERSION.D>]
<cluster namespace> <cluster name b> # # <TKR.VERSION.B> ###d True True
kubectl describe cluster -n <cluster namespace> <cluster name>
Type: TopologyReconciled
Last Transition Time: YYYY-MM-DDTHH-MM-SSZ
Message: [<TKR.VERSION.B> <TKR.VERSION.D>]
kubectl get tkr | grep <tkr version>
<TKR---VERSION.C> <TKR+VERSION.C> True True ###d
kubectl get pods -A | grep -v Run
error: clusters.cluster.x-k8s.io "<cluster name>" could not be patched: admission webhook 'tkr-resolver-cluster-webhook.tanzu.vmware.com" denied the request: could not resolve TKR/OSImage for controlPlane, machineDeployments: [<nodepool-name>], query: [controlPlane: {k8sVersionPrefix: '<TKR.VERSION>, tkrSelector: "tkr.tanzu.vmware.com/standard', osImageSelector: 'os-arch-amd64,os-name=<operating system>,os-version=<operating system version>,tkr.tanzu.vmware.com/standard'}, machineDeployments: [{k8sVersionPrefix: '<TKR.VERSION>', tkrSelector: 'tkr.tanzu.vmware.com/standard', osImageSelector: 'os-arch=amd64,os-name=<operating system>,os-version=<operating system version>'}]}, result: {controlPlane: {k8sVersion: '', tkrName: '', osImagesByTKR: map[]}, machineDeployments: [{k8sVersion: '', tkrName: '', osImagesByTKR: map[]}]}
In the vSphere web UI, the following checks regarding the content library and namespaces match:
In Tanzu Mission Control (TMC) web console, the affected workload cluster would not be able to be upgraded or the desired TKR version would not be available to be selected.
vSphere with Tanzu 7.0
vSphere with Tanzu 8.0
This issue can occur regardless of whether or not the cluster is managed or upgraded by Tanzu Mission Control (TMC)
The available updates for a workload cluster is populated based on the N+1 version for the next TKR, the OS version of the workload cluster, the compatibility of the next TKR with the environment and the availability of the image in the Supervisor cluster.
A workload cluster cannot skip TKR versions and must be upgraded sequentially. For example, v1.27 to v1.28 then v1.28 to v1.29.
Once a workload cluster is upgraded to a TKR for vSphere 8.0 (non-legacy), it cannot be upgraded to a TKR for vSphere 7.0 (legacy) regardless of the version.
The operating system of a workload cluster currently cannot be changed. A new workload cluster on the desired OS must be created.
TKRs for vSphere 7.0 (legacy) are listed multiple times for the same version, appended with .ubuntu for the ubuntu operating system.
TKRs for vSphere 8.0 (non-legacy) are not appended with the operating system and an annotation is used to determine the operating system.
Initial checks should be made to confirm that the desired TKR matches the following requirements:
kubectl get tkr | grep <tkr version>
If the above checks return that the desired TKR is a valid TKR to upgrade to, the following checks can be made to ensure that its image was properly created in the Supervisor cluster:
kubectl describe cluster -n <cluster namespace> <cluster name>
kubectl get osimage,virtualmachineimage | grep <tkr version>
kubectl get osimage,cvmi | grep <tkr version>
kubectl get osimage | grep <tkr version>
NAME K8S VERSION OS NAME OS VERSION ARCH TYPE COMPATIBLE CREATED
<vmi-id-a> <tkr version a> photon #.# amd64 vmi ###d
<vmi-id-b> <tkr version b> ubuntu ##.## amd64 vmi ###d
This is a known issue which was resolved in TKG service 3.1 and higher.
Missing OsImage with Desired Operating System Workaround Steps:kubectl get tkr | grep <tkr version>
kubectl delete tkr <tkr version>
kubectl get tkr | grep <tkr version>
kubectl get osimage | grep <tkr version>
Please reach out to VMware by Broadcom Technical Support referencing this KB article.