Introduction
This article covers the following tech skills:
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
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.
Print the Client Version Information
To print the client version information, execute the following command:
kubectl version --client
This will output the client version information, including the Kubernetes version, Git commit hash, and build date.
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
This will output the server version information in JSON format.
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
This will output the server version information in YAML format.
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.
🚀 Practice Now: Kubernetes Client and Server Version
Want to Learn More?
- 🌳 Learn the latest Kubernetes Skill Trees
- 📖 Read More Kubernetes Tutorials
- 💬 Join our Discord or tweet us @WeAreLabEx
Top comments (0)