您是否指定了正确的主机或端口?Kubernetes 上的错误

编程入门 行业动态 更新时间:2024-10-08 13:38:45
本文介绍了您是否指定了正确的主机或端口?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 上的错误

本文发布于:2023-11-23 06:43:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1620477.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:端口   正确   错误   主机   您是否

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!