The connection to the server localhost:8080 was refused - did you specify the ri . . .

Ramthulla A:
The connection to the server localhost:8080 was refused - did you specify the right host or port?

i am facing issue with this error?

Mani:
I could think of 2 possible issues,
1, Need to check if api-server is running and check logs for any errors
2, is kubeconfig pointing to the right cluster(Ips and port)