本文介绍了您是否指定了正确的主机或端口?Kubernetes 上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遵循了 kubernetes.io/docs/hellonode/ 上的 helloword 教程.
I have followed the helloword tutorial on kubernetes.io/docs/hellonode/.
当我跑步时:
kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080我明白了:
与服务器 localhost:8080 的连接被拒绝 - 您是否指定了正确的主机或端口?
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?
推荐答案问题在于您的 kubeconfig 不正确.要自动生成它,请运行:
The issue is that your kubeconfig is not right. To auto-generate it run:
gcloud container clusters get-credentials "CLUSTER NAME"这对我有用.
更多推荐
您是否指定了正确的主机或端口?Kubernetes 上的错误
发布评论