Cluster information
It is always good to know which version of the Kubernetes server (API) is installed for a Kubernetes cluster as you might want to use particular features available in that version. To check the server version, run the following:
$ kubectl version --short Client Version: v1.18.1 Server Version: v1.17.5-gke.9
The server version is v1.17.5
and the kubectl
version is v1.18.1
. Note that the -gke.9
bit of the server version is the internal GKE revision; as we mentioned earlier, for the book's purposes, a GKE cluster is used.
Important note
The kubectl
version can be a more recent one; it does not really have to match the server version, as the latest version is usually backward compatible. However, it is not recommended to use an older kubectl
version with a more recent server version.
Next, let's check the cluster server information by running the following command:
$ kubectl cluster-info Kubernetes master is running at https://35.223.200...