Announcing our $32 million Series B
How to check your k8s version

How to check your k8s version

May 17, 2022
2 min read

Kubernetes is a popular container orchestration framework. It enables you to scale and manage large clusters of containers to deploy your applications efficiently to a large number users. Kubectl is a command-line tool that is used to manage your Kubernetes cluster.

In this guide, you will learn how to check the version of your Kubernetes resources using kubectl version.

Using kubectl version

kubectl provides a very simple command for viewing version details:


However, there are a number of ways you can use this command. Also, there are a few other things you might be looking for when viewing the version of your Kubernetes resources. Let’s take a look at them one by one.

Running kubectl version

You can view the cluster version using this command. Cluster version, here, refers to the version of the API server of your cluster. If you run the above command, you will receive a similar output:


The command returns two version details with quite verbose output.

The server version refers to the version of your Kubernetes API server. The client version refers to the version of your kubectl CLI.

Viewing shorter versions

You can switch to a cleaner version using the following command:


Now, you will receive a similar output:


Viewing the client version only

You can also view only the client version by running the following command:


This will return only the kubectl CLI version to the output.


This is useful in situations when your CLI is not connected to an active Kubernetes API server. You can still access the CLI version without getting an error.

Node version

If you are looking for the version details of your nodes, you need to run the following command:


In the output that will be generated, you will see the version of the kubelet of each node listed against it:


For a more generalistic approach, you can append -o yaml to most commands to get a more detailed output, possibly containing version details that you are looking for. For instance, you can also view the version details of the kubelets of each node by running kubectl get nodes -o yaml and searching through the output for “kubelet”.

Final thoughts

Kubernetes is, without a doubt, one of the most complex open-source projects. In this guide, you learned how to view the version details for a wide variety of resources and entities in Kubernetes.

Share this article:
Kumar Harsh
Kumar is a software developer and technical author. He has written for a number of software companies including LogRocket and Career Karma.

Subscribe to new blog posts from Airplane.