Fresh macos install - kubectl outputs error message

4/23/2019

On Macbook Pro, tried installing from binary with curl and then with brew.

Both installs generate an error at the end of output:

~ via  v7.1.23
kubectl version --output=yaml
clientVersion:
  buildDate: "2019-04-19T22:12:47Z"
  compiler: gc
  gitCommit: b7394102d6ef778017f2ca4046abbaa23b88c290
  gitTreeState: clean
  gitVersion: v1.14.1
  goVersion: go1.12.4
  major: "1"
  minor: "14"
  platform: darwin/amd64

error: unable to parse the server version: invalid character '<' looking for beginning of value

Is there a way to fix this?

-- stefgosselin
kubernetes

1 Answer

4/24/2019

I think there is another application listening on 8080 port. By default, kubectl will try to connect on localhost:8080 if no server is passed.

If you have deployed kubernetes apiserver on some other machine or port, pass --server=IP:PORT to kubectl.

-- Akash Sharma
Source: StackOverflow