You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When managing different clusters with different kubectl (server) versions (kubelet api) one has to manually switch between the locally kubectl version. There is no prevention by default that one uses an unsupported kubectl version unless you use kubectl --match-server-version explicitly.
Workaround
We use asdf kubectl to switch between kubectl versions by adding .tool-versions to folders that automatically switch between kubectl versions. For example:
This general solution would make it possible to use different kubectl versions (binaries) per cluster. So one could use asdf, update-alternatives, brew etc.
If this issue is accepted I can build it and open a MR. But I wanted to make sure that the effort is worth it. I am already a kubernetes contributor.
The text was updated successfully, but these errors were encountered:
SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.
The triage/accepted label can be added by org members by writing /triage accepted in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Problem
When managing different clusters with different kubectl (server) versions (kubelet api) one has to manually switch between the locally kubectl version. There is no prevention by default that one uses an unsupported kubectl version unless you use
kubectl --match-server-version
explicitly.Workaround
We use asdf kubectl to switch between
kubectl
versions by adding.tool-versions
to folders that automatically switch between kubectl versions. For example:cluster-a
: kubectl 1.29.12cluster-b
: kubectl 1.28.15Suggested Solution
It would be nice to be able to specify the local kubectl version/path in the
kubeconfig
file. For the moment there is no such field inkubeconfig.v1
: https://kubernetes.io/docs/reference/config-api/kubeconfig.v1/.I would suggest to extend
cluster
object by ankubectl-client
attribute. It would look like this:This general solution would make it possible to use different kubectl versions (binaries) per cluster. So one could use
asdf
,update-alternatives
,brew
etc.If this issue is accepted I can build it and open a MR. But I wanted to make sure that the effort is worth it. I am already a kubernetes contributor.
The text was updated successfully, but these errors were encountered: