Unable to upgrade Guest cluster TKr from 1.32 to 1.33
search cancel

Unable to upgrade Guest cluster TKr from 1.32 to 1.33

book

Article ID: 418494

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

  • Attempt to upgrade TKr from 1.32 to 1.33
  • Upgrade failed with error :
    • k edit cluster <cluster name> -n <namespace>
      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 KR/OSImage
      Multiple OSImages resolved for Control Plane. KR: v1.33.1---vmware.1-fips-vkr.2, OSImages resolved: [vmi-clitemid vmi-clitemid], filters: {k8sVersionPrefix: v1.33.1---vmware.1-fips-vkr.2, osImageSelector: os-name=ubuntu}
  • Articles - kubernetes guest cluster creation failing with "Multiple OSImages resolved for Control Plane" does not resolve the issue

Environment

vSphere with Tanzu

Cause

If the Content Library contains more than one OS image entry for the same distribution but with different version releases, ambiguity occurs during image resolution. Explicitly defining the desired version is required to retrieve the correct OS image

Resolution

Validation:

  • Check the content library image details using the below commands
    • kubectl get clustercontentlibraries
      NAME                   VSPHERENAME          TYPE         STORAGETYPE   AGE
      cl-<clid>                Tanzu - Subscribed      Subscribed           Datastore        Xd
  • Confirm if there are two versions in the clustercontentlibrary
    • kubectl get clustercontentlibraryitems --sort-by='{.status.contentLibraryRef.name}' --no-headers  | awk '{print $1,$2,$3}' | sort -n | grep cl-<clid>
      clitem-a6a2a2b3846e4d4b1 ob-24791110-ubuntu-2404-amd64-v1.33.1---vmware.1-fips-vkr.2 cl-<clid>
      clitem-83f0442c0c3bfc06f ob-24791150-ubuntu-2204-amd64-v1.33.1---vmware.1-fips-vkr.2 cl-<clid>

Resolution:

  • Specify the TKRversion in Controlplane and vmclass specs while editing the cluster
    •  topology:
          class: builtin-generic-v3.4.0
          classNamespace: vmware-system-vks-public
          controlPlane:
            metadata:
              annotations:
                run.tanzu.vmware.com/resolve-os-image: os-name=ubuntu,os-version=22.04
            nodeDeletionTimeout: 0s
            replicas: 3
    • name: vmClass
      value: best-effort-medium
      - name: vsphereOptions
      value:
      persistentVolumes:
      availableStorageClasses:
      - tanzu-placement-raid1
      defaultStorageClass: ""
      defaultVolumeSnapshotClass: ""
      version: v1.33.1+vmware.1-fips
      workers:
      machineDeployments:
      - class: node-pool
      failureDomain: vmware-system-legacy
      metadata:
      annotations:
      run. tanzu. vmware. com/resolve-os-image: os-name=ubuntu, os-version=22.04