Client and Server Version
To view the version information for both the Kubernetes client and server, use the following command:
kubectl version
This command will output details for both the client (your local kubectl
tool) and the server (the Kubernetes API running in your cluster). The version information includes the major and minor versions, Git commit hash, build date, and more.
For example, you might see output like this:
Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.0", ...}
Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.0", ...}
The "Client Version" shows the version of your kubectl
tool, while the "Server Version" refers to the Kubernetes API server in the cluster. These versions should ideally match or be compatible for commands to work correctly.