error: clusters.cluster.x-k8s.io <guest-cluster-name> could not be patched:admission webhook "tkr-resolver-cluster-webhook.tanzu.vmware.com" denied the request:Could not resolve KR/OSImage. Missing compatible KR/OSImage for the clusterControl Plane, filters: {k8sVersionPrefix: vX.Y.Z+vmware.A-..., osImageSelector: name=vmi-######}MachineDeployment <machine-deployment-name>, filters: {k8sVersionPrefix: vX.Y.Z+vmware.A-..., osImageSelector: name=vmi-######}
The update operation on the Cluster resource is rejected by the TKR resolver admission webhook.
The error references:
k8sVersionPrefix – the requested Kubernetes version.
osImageSelector: name=vmi-###### – a specific VM image identifier.
As the admission request is denied, no control plane or worker nodes begin upgrading.
Example configuration:
spec: topology: classRef: name: builtin-generic namespace: vmware-system-vks-public version: vX.Y.Z+vmware.A-... controlPlane: metadata: annotations: run.tanzu.vmware.com/resolve-os-image: name=vmi-0fbbe6ac93e81e1d4 workers: machineDeployments: - class: node-pool metadata: annotations: run.tanzu.vmware.com/resolve-os-image: name=vmi-0fbbe6ac93e81e1d4
The annotation run.tanzu.vmware.com/resolve-os-image specifies name=<vmi-id>.
This pins the cluster to a specific VM image.
A Kubernetes Release (TKR) matching the requested version, and
An OSImage matching the specified selector.
The Kubernetes version requested may be valid.
However, it cannot be used with the pinned VM image, causing the upgrade to fail.
Remove the VM image–specific selector and instead configure the cluster to use an OS family selector. This allows the resolver to automatically choose a compatible OS image for the requested Kubernetes version.
Example configuration:
apiVersion: cluster.x-k8s.io/v1beta1kind: Clustermetadata: name: <guest-cluster-name> namespace: <guest-cluster-namespace>spec: topology: classRef: name: builtin-generic namespace: vmware-system-vks-public version: vX.Y.Z+vmware.A-... controlPlane: replicas: 3 metadata: annotations: run.tanzu.vmware.com/resolve-os-image: os-name=ubuntu <------- Removed the VM image selector workers: machineDeployments: - class: node-pool name: md-0 metadata: annotations: run.tanzu.vmware.com/resolve-os-image: os-name=ubuntu
This allows the resolver to select any compatible OSImage for the requested Kubernetes version.
kubectl edit, save the updated configuration after modifying the annotation.kubectl replace -f /tmp/kubectl-edit-####.yaml
Avoid pinning clusters to a specific VM image ID (VMI) unless strictly required.
Use OS family selectors such as os-name=ubuntu or os-name=photon to maintain upgrade flexibility.
Before performing cluster upgrades, ensure that compatible TKRs and OSImages are available for the target Kubernetes version.
In environments with strict image management policies, verify that new OS images are published and mapped to TKRs before initiating upgrades.