-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubectl built from head does not recognize all api versions with older server version #40813
Comments
Why using
|
I was just using kubectl.sh to run the newly built client from master. |
@foxish kubectl is built on HEAD
|
My server version is 1.5.2. I'm having issues with new kubectl and 1.5.x server version still. Checking against a server built from HEAD now. |
@foxish Does it work? |
Yes, it works with server and client built from HEAD. But the problem persists with a 1.5.2 server and client built from HEAD. The server says it doesn't know about StatefulSets, PDBs etc (no |
This should be some server-client version skew, and basically we should support old server version. |
will take a look asap. |
Thanks @adohe |
@chrislovecnm if I can raise a PR by this weekend, I will try to get it into 1.6(already code freeze :() |
it looks like the user agent set by kubectl build from head is wrong:
that incorrect user agent triggers a workaround in the 1.5.x apiserver that omits the apps API group when requested by an "old" kubectl (#35840) |
not sure if that same issue exists with an official release build of kubectl or not |
The root cause is when use |
@caesarxuchao PTAL |
I think the root cause is probably a bug in the workaround for the API server. It's detection of "old" should be tightly contained. |
The version filter in the 1.5 API server: https://github.com/kubernetes/kubernetes/pull/35840/files#diff-fdfac9813673596faeda07fdce9207e2R346 |
And the version sent by kubectl built from head is:
v0.0.0 is considered older than v1.5.0. The workaround in 1.5 API server didn't consider this case. We can send a bug fix to the 1.5 branch to specially treat v0.0.0. |
User-agent in kubectl built from v1.6.0-alpha.2 is |
Thanks point out @deads2k |
Automatic merge from submit-queue Fix v0.0.0 in kubectl built from master Fixes #40813
In case of kubectl built from head:
Older kubectl 1.5.2
cc @kubernetes/sig-cli-bugs @pwittrock @ymqytw
The text was updated successfully, but these errors were encountered: