vSphere with Tanzu TKR has a label "os-name=ubuntu" but the TKR's extension isn't .ubuntu
search cancel

vSphere with Tanzu TKR has a label "os-name=ubuntu" but the TKR's extension isn't .ubuntu

book

Article ID: 396055

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

  • When you list non-Legacy TKRs, you see that there is only one TKR per version and none of them have an .ubuntu extension:
    kubectl get tkr
    
    NAME                                      VERSION                                 READY   COMPATIBLE   CREATED 
    v1.28.8---vmware.1-fips.1-tkg.2           v1.28.8+vmware.1-fips.1-tkg.2           True    True         7h23m
    v1.29.4---vmware.3-fips.1-tkg.1           v1.29.4+vmware.3-fips.1-tkg.1           True    True         7h24m
    v1.30.1---vmware.1-fips-tkg.5             v1.30.1+vmware.1-fips-tkg.5             True    True         7h24m
    v1.30.8---vmware.1-fips-vkr.1             v1.30.8+vmware.1-fips-vkr.1             False   False        7h23m
    v1.31.1---vmware.2-fips-vkr.2             v1.31.1+vmware.2-fips-vkr.2             False   False        7h23m
    v1.31.4---vmware.1-fips-vkr.3             v1.31.4+vmware.1-fips-vkr.3             False   False        7h23m
    v1.32.0---vmware.6-fips-vkr.2             v1.32.0+vmware.6-fips-vkr.2             False   False        7h24m
  • When you describe one of the TKRs, it may have a label of os-name=ubuntu and no reference to Photon. 

Environment

vSphere with Tanzu 8.0

Resolution

This is expected behavior with non-Legacy TKR versions. Depending on the TKR, os-name may be photon or ubuntu. When describing non-Legacy TKRs, you will also see that it contains two entries under Os Images:

  Os Images:
    Name:   vmi-1
    Name:   vmi-2

Listing these OS images will show that one is Photon and the other is Ubuntu:

kubectl get osimage | egrep 'vmi-1|vmi-2'

NAME                    K8S VERSION                OS NAME   OS VERSION   ARCH    TYPE   COMPATIBLE   CREATED
vmi-1                   v1.32.0+vmware.6-fips      ubuntu    22.04        amd64   vmi                 7h34m
vmi-2                   v1.32.0+vmware.6-fips      photon    5            amd64   vmi                 7h34m

As explained in v1beta1 Example: Cluster with Ubuntu TKR, Photon is the default OS image and if you want to use Ubuntu, you will need to specify so in your cluster's YAML file. 

Additional Information

  • When listing TKRs of type Legacy, you will see two entries per TKR version (v1.27.6 in this example). One TKR ends with .ubuntu and the other does not: 
    kubectl get tkr
    
    NAME                                      VERSION                                 READY   COMPATIBLE   CREATED   TYPE
    v1.27.6---vmware.1-fips.1-tkg.1           v1.27.6+vmware.1-fips.1-tkg.1           True    True         7h3m      Legacy
    v1.27.6---vmware.1-fips.1-tkg.1.ubuntu    v1.27.6+vmware.1-fips.1-tkg.1.ubuntu    True    True         7h3m      Legacy
  • If you describe the TKR without the .ubuntu extension, it will have a label of os-name=photon and a single entry under Os Images:

    Name:         v1.27.6---vmware.1-fips.1-tkg.1
    Namespace:
    Labels:       os-arch=amd64
                  os-name=photon
                  os-type=linux
                  os-version=3.0
    ...
      Os Images:
        Name:   vmi-8c43c21a3ff045d9e
    
  • Listing the OS Image above shows that the OS name is photon:
    kubectl get osimage vmi-1
    NAME                    K8S VERSION               OS NAME   OS VERSION   ARCH    TYPE   COMPATIBLE   CREATED
    vmi-1                   v1.27.6+vmware.1-fips.1   photon    3.0          amd64   vmi                 7h18m
    
  • Performing the same steps on the v1.27.6---vmware.1-fips.1-tkg.1.ubuntu image will show that it's using an Os Image of type ubuntu.