Recommendation for a Single kubectl Client Version Across Multiple TKGI Environments
search cancel

Recommendation for a Single kubectl Client Version Across Multiple TKGI Environments

book

Article ID: 447118

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

Your are running multiple distinct versions of Tanzu Kubernetes Grid Integrated Edition (TKGI) in your infrastructure. To streamline operations and administration, you wish to utilize a single kubectl client binary that is fully compatible and officially supported across all target environments. You require a generalized framework to determine the correct kubectl version to deploy.

 

Resolution

To maintain single-binary compatibility across a diverse environment, you must map the platform versions to their underlying upstream Kubernetes components and evaluate them against the client tool support window.

1. Identify Your Underlying Kubernetes (kube-apiserver) Versions

Before selecting a client version, you must find the precise upstream Kubernetes minor version (which is as same as kube-apiserver version) bundled with each deployed version of your platform. This mapping can be found dynamically under the Internal Component Versions section within TKGI release note.  

2. Apply the kubectl Version Skew Policy

The official Kubernetes Version Skew Policy states that the kubectl CLI tool is supported when it falls within one minor version (older or newer) of the target cluster's control plane (kube-apiserver).

Example:

  • kube-apiserver is at 1.33
  • kubectl is supported at 1.34, 1.33, and 1.32

In the other word, kubectl 1.33 is compatible with kube-apiserver 1.34, 1.33, 1.32.