cannot run kubectl, due to port conflicts but also cannot fix them with solutions online

10/15/2019

error: unable to recognize "xxxxx-pod.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused,

I tried the solutions available online but none of them really worked.

-- Venkateshreddy Pala
aws-eks
google-compute-engine
google-kubernetes-engine
kubernetes
ubuntu

2 Answers

10/16/2019

It was due to the flannel issue but I think it is resolved now. I had to put a hold on the versions of kubectl as they upgraded without my knowledge. This worked for me.

-- Venkateshreddy Pala
Source: StackOverflow

10/15/2019

This means your kubeconfig is not correct. It is using the default server URL which is probably not what you intended.

-- coderanger
Source: StackOverflow