kubectl Verified current stable Not installed? Kubernetes

Kubectl / Print Client And Server Version Current Context

Print Client And Server Version Current Context

Use kubectl version to display the client and server version information for your Kubernetes context.

$
Terminal
kubectl version

When To Use

To validate compatibility before applying updates or changes to the cluster environment.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Client Version: v1.22.0
Server Version: v1.21.5
Kubernetes context: my-cluster

Command Breakdown

What each part is doing

kubectl
Base Command
The executable that performs this operation. Here it runs Kubectl before the shell applies any redirect operators.

How To Run

Execution path

  1. Step 1

    Open your terminal.

  2. Step 2

    Run the command: kubectl version.

  3. Step 3

    Review the displayed client and server version information.

Alternative Approaches

Comparable commands in other tools

Alternative kubernetes tools for the same job.