Did you know that “You must use a kubectl version that is within one minor version difference of your cluster”?
What does this mean?
Kubernetes uses Semantic Versioning, expressed as vX.Y.Z
X = major version
Y = minor version
Z = patch version
Hence, it means that for a cluster of v1.26 (major version = 1, minor version = 26), the valid versions of kubectl that you should use while interacting with the cluster should be between v1.25 and v1.27.
You can check the version of kubectl using the command:
kubectl version
.
From the output of that command, you can tell whether you’re compatible or not. I have used the --output=yaml
flag to present the information a lot nicer.
Under the clientVersion
, you can see the version of the kubectl client installed, while the version of the Kubernetes cluster is found under serverVersion
.
If you’re not compatible, you can simply downgrade or upgrade kubectl, or better still, you can stay tuned for the part two of this series to learn an easier and better way to handle this.
Top comments (0)