Validate TKGI product and Kubernetes component versions within a TKGI environment
search cancel

Validate TKGI product and Kubernetes component versions within a TKGI environment

book

Article ID: 378329

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated (TKGi) VMware Tanzu Kubernetes Grid Integrated Edition VMware Tanzu Kubernetes Grid Integrated Edition (Core) VMware Tanzu Kubernetes Grid Integrated Edition 1.x VMware Tanzu Kubernetes Grid Integrated EditionStarter Pack (Core)

Issue/Introduction

Intro:

A Technical Support Engineer or Customer Operator may need to verify specific versions of:

  • Individual TKGI components versions within a TKGI foundation

  • Individual Kubernetes components versions within a Kubernetes cluster
  • The TKGI tile version

    • When you may not have access to the Opsmanager UI

 

This article provides:

  • Methods for extracting component release versions running inside a TKGI deployment foundation. 

  • Additional methods of obtaining the version of the TKGI tile from attached data, such as from:

 

 

NOTE: Refer to the "Product Snapshot" section of your TKGI version.  Contains a list of some of the components you may want to validate in an environment:

  • Some of the example component versions referenced in this article include: 

    • Kubernetes version

    • etcd version

    • VMware NSX version (Previously referred to as ‎VMware NSX-T Data Center)

    •  VMware NSX Container Plugin (NCP) component version

    • Antrea CNI version

    • VMware Harbor Registry

    • CSI Driver for vSphere

    • Velero

 

 

 

NOTE:

Most, if not all, of this information can be obtained from Kubernetes cluster log bundles (using the bosh CLI) or the Opsmanager Support bundle

 

Examples:

  • The TKGI tile version as well as individual TKGI component versions exist within Opsmanager Support Bundle

  • So do many of the Kubernetes cluster components versions

  • Different artifacts can be used to extract component versions as well.  Examples include:

    • bosh CLI: Download the TKGI Deployment Manifest

      • You or a Tanzu Engineer can extract TKGI component versions from that manifest

    • bosh CLI: Download a Kubernetes cluster deployment manifest.
      • You or a Tanzu Engineer can extract the Kubernetes cluster component versions from the k8s cluster manifest

    • tkgi CLI: To show the TKGI Tile version

 

 

 

 

Environment

TKGI: Tile version 1.14 and later

VMware NSX

NSX Container Plugin (NCP)

Antrea Networking

Harbor Registry: Tile version 2.5.0 and later

Resolution

Requirements:

 

Below are different methods for locating the running TKGI version and component versions running within a TKGI foundation.

 

Identify the TKGI Tile version when you don't have access to the Opsmanager Web UI

1- From The Tanzu OPS Manager Support Bundle

    • Change to the TKGI (pivotal-container-service) deployed_manifest_and_configs directory

cd support_bundle_XXXXXXXXXXXXXX/deployed_manifest_and_configs/pivotal-container-service-XXXXXXXXXXXXXXXXXXXX

    • Pull out the the TKGI Tile version from the last successful TKGI deployment manifest:

NOTES:

        • TKGI makes use of legacy names, pks or pivotal-container-service.

        • There are two TKGI Tile deployment instance_groups in the manifest:

          • pks-db 

and

          • pivotal-container-service

Below command obtains the Tile build version from the pivotal-container-service instance_group under properties.service_catalog.maintenance_info:

yq '.instance_groups[1].properties.service_catalog.maintenance_info.public.pks' manifest_last_successful_XXXXXXXXXXXXXX.yml


Example output:

1.20.0-build.52

 

2- From TKGI bosh manifest directly 

    • Access the Tanzu OPS Manager VM

    • Identity the TKGI deployment instance ID. (aka pivotal-container-service)

bosh deployments --column=name | grep pivotal-container-service

Example output:

pivotal-container-service-XXXXXXXXXXXXXXXXXXXX

    • Obtain the TKGI bosh manifest (aka pivotal-container-service) from the environment

bosh -d pivotal-container-service-XXXXXXXXXXXXXXXXXXXX manifest > pivotal-container-service_manifest.yaml

    • Download the manifest to machine that has the yq CLI installed

    • Extract the TKGI (aka pks) Tile version from the manifest

yq '.instance_groups[1].properties.service_catalog.maintenance_info.public.pks' pivotal-container-service_manifest.yaml

Example output:

1.20.0-build.52

 

3- Or from the tkgi CLI while accessing environment

tkgi clusters | awk '{print $1}'

Example output with 2 Kubernetes clusters running:

$ tkgi clusters | awk '{print $1}'

PKS
1.20.0-build.52
1.20.0-build.52

 

 

Identifying various Kubernetes cluster component versions

NOTE: These run as bosh jobs in TKGI. 

Obtain the TKGI (pivotal-container-service) manifest:

    1. From the Tanzu Ops Manager Support Bundle:

      cd support_bundle_XXXXXXXXXXXXXX/deployed_manifest_and_configs/pivotal-container-service-XXXXXXXXXXXXXXXXXXXX

      Manifest file name:

      manifest_last_successful_XXXXXXXXXXXXXX.yml

    2. Or from the bosh CLI

bosh deployments --column=name | grep pivotal-container-service

Example output:

bosh -d pivotal-container-service-XXXXXXXXXXXXXXXXXXXX manifest > pivotal-container-service_manifest.yaml

 

  • Verify the Kubernetes version running on clusters.

NOTE: This is the Kubernetes version provided with the current TKGI Tile.

yq '.instance_groups[1].properties.service_catalog.maintenance_info.public.kubernetes' pivotal-container-service_manifest.yaml

Example output:

1.29.6

 

  • Verify the VMware NSX Container Plugin (NCP) version:

yq '.instance_groups[1].properties.service_deployment.releases | filter(.name == "nsx-cf-cni")' manifest_last_successful_XXXXXXXXXXXXXX.yml

Example output showing version 4.2.0.0 for the ncp job:

- name: nsx-cf-cni
  version: 4.2.0.0.24016753
  jobs:
    - ncp
    - nsx-node-agent
    - openvswitch
    - nsx-cni
    - nsx-kube-proxy

 

  • Verify the vsphere-csi version:

yq '.instance_groups[1].properties.service_deployment.releases | filter(.name == "vsphere-csi")' manifest_last_successful_XXXXXXXXXXXXXX.yml

Example output showing version 3.3.0 for the vsphere-csi job:

- name: vsphere-csi
  version: 3.3.0-build.1
  jobs:
    - csi-controller
    - csi-images
    - csi-node-service

 

  • Verify the Antrea CNI version:

yq '.instance_groups[1].properties.service_deployment.releases | filter(.name == "antrea")' manifest_last_successful_XXXXXXXXXXXXXX.yml

Example output showing version 1.13.3 for the antrea CNI bosh process:

- name: antrea
  version: 1.13.3-build.2
  jobs:
    - deploy-antrea
    - deploy-proxy-agent
    - load-antrea-images
    - prepare-antrea-nodes
    - proxy-server

 

  • OR Show all Kubernetes cluster components and their release versions:

yq '.instance_groups[1].properties.service_deployment.releases' manifest_last_successful_XXXXXXXXXXXXXX.yml

 

 

Identifying Harbor tile version

NOTE: This runs as a bosh deployment within TKGI. 

Obtain the Harbor manifest:

    1. From the Tanzu Ops Manager Support Bundle:

      cd support_bundle_XXXXXXXXXXXXXX/deployed_manifest_and_configs/harbor-container-registry-XXXXXXXXXXXXXXXXXXXX

      Manifest file name:

      manifest_last_successful_XXXXXXXXXXXXXX.yml

    2. Or from the bosh CLI

bosh deployments --column=name | grep harbor-container-registry

                  Manifest file name:

bosh -d harbor-container-registry-XXXXXXXXXXXXXXXXXXXX manifest > harbor-container-registry_manifest.yaml

 

  • Pull the Harbor release version info from the manifest 

yq '.releases | filter(.name == "harbor-container-registry")' HARBOR_MANIFEST_FILE.yml

Example output showing version 2.11.0 for the harbor-container-registry bosh deployment:

- name: harbor-container-registry
  version: 2.11.0-build.2
  url: file:///var/tempest/releases/harbor-container-registry-2.11.0.tgz