I have followed the helloword tutorial on http://kubernetes.io/docs/hellonode/.
When I run:
kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080
I get:
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Why does the command line try to connect to the localhost?
The issue is that your kubeconfig is not right. To auto-generate it run:
kubeconfig
gcloud container clusters get-credentials "CLUSTER NAME"
This worked for me.
1.4m articles
1.4m replys
5 comments
57.0k users