DEV Community

Ileriayo Adebiyi
Ileriayo Adebiyi

Posted on

1

Be Kubectl Kompatible (1)

Did you know that “You must use a kubectl version that is within one minor version difference of your cluster”?
Image description

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.
Image description

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.

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay