Kubectl returns Error from server (NotAcceptable): unknown (get nodes)

12/7/2018

According to this: https://github.com/kubernetes/kops#compatibility-matrix the versions should be fine. When I run kubectl get node I get the following output:

Error from server (NotAcceptable): unknown (get nodes)

kubectl version:

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T21:04:45Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.16", GitCommit:"e8846c1d7e7e632d4bd5ed46160eff3dc4c993c5", GitTreeState:"clean", BuildDate:"2018-04-04T08:47:13Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

kops version:

Version 1.9.2 (git-cb54c6a52)

This is the info about the nodes I got when running kops update:

NAME                    STATUS  NEEDUPDATE      READY   MIN     MAX     NODES
master-eu-central-1a    Ready   0               1       1       1       1
nodes                   Ready   0               2       2       2       2
-- elp
amazon-web-services
kops
kubernetes

1 Answer

12/8/2018

I missunderstood this. It's pretty obvious now: Client: 1.13.0, Server: 1.7.16. The server must be the clients version (+/-1 is supported, see here for more). So I edited the server version using kops edit cluster and updated it with kops update cluster.

-- elp
Source: StackOverflow