DEV Community

Cover image for Kubernetes Client and Server Version | Kubernetes Troubleshooting
Labby for LabEx

Posted on

Kubernetes Client and Server Version | Kubernetes Troubleshooting

Introduction

This article covers the following tech skills:

Skills Graph

Kubernetes is a popular container orchestration tool that enables developers to deploy, scale, and manage containerized applications. In this lab, you will learn how to print the client and server version information on Kubernetes. This information can be useful for troubleshooting and understanding which version of Kubernetes is running.

Prerequisites

  • A running Kubernetes cluster
  • Access to a terminal with kubectl installed

Print the Server Version Information

To print the server version information, execute the following command:

kubectl version
Enter fullscreen mode Exit fullscreen mode

This will output the server version information, including the Kubernetes version, Git commit hash, and build date, as well as the Kubernetes API serverversion, controller manager version, and scheduler version.

lab-kubernetes-client-and-server-version-2

Print the Client Version Information

To print the client version information, execute the following command:

kubectl version --client
Enter fullscreen mode Exit fullscreen mode

This will output the client version information, including the Kubernetes version, Git commit hash, and build date.

lab-kubernetes-client-and-server-version-1

Print the Server Version Information With JSON Output

To print the server version information with JSON output, execute the following command:

kubectl version --output=json
Enter fullscreen mode Exit fullscreen mode

This will output the server version information in JSON format.

lab-kubernetes-client-and-server-version-3

Print the Server Version Information in YAML Format

To print the server version information in YAML format, execute the following command:

kubectl version --output=yaml
Enter fullscreen mode Exit fullscreen mode

This will output the server version information in YAML format.

lab-kubernetes-client-and-server-version-4

Summary

In this lab, you learned how to print the client and server version information on Kubernetes. You also learned how to output the server version information in JSON and YAML formats. This information can be useful for troubleshooting and understanding which version of Kubernetes is running.

MindMap


🚀 Practice Now: Kubernetes Client and Server Version


Want to Learn More?

Top comments (0)