gpt4 book ai didi

kubernetes - kubectl : Unable to connect to the server : dial tcp 192. 168.214.136:6443:连接:主机没有路由

转载 作者:行者123 更新时间:2023-12-02 11:37:09 26 4
gpt4 key购买 nike

我最近在VMware上安装了kubernetes,还配置了一些Pod,在配置这些Pod时,它会自动使用VMware的IP进行配置。在此期间,我能够访问该应用程序,但是最近我重新启动了VM和托管该VM的计算机,在此期间-我猜想VM的IP已经更改,现在-使用命令时出现以下错误:

kubectl取得pod -n

userX@ubuntu:~$ kubectl get pod -n NameSpaceX
Unable to connect to the server: dial tcp 192.168.214.136:6443: connect: no route to host```

userX@ubuntu:~$ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Unable to connect to the server: dial tcp 192.168.214.136:6443: connect: no route to host

kubectl cluster-info以及其他相关命令提供相同的输出。
在VMware工作站设置中,我们正在使用共享主机IP地址设置的网络适配器。我们不确定它是否有影响。

我们还尝试在/etc/hosts中添加以下条目,它不起作用。

127.0.0.1本地主机\n
192.168.214.136本地主机\n
127.0.1.1 ubuntu

我希望再次运行Pod来访问该应用程序,而不是重新安装所有耗时的Pod,我们正在寻找一种快速的解决方法,以便Pod能够恢复运行状态。

最佳答案

如果您使用minikube,有时您要做的只是重启minikube
运行:minikube开始

关于kubernetes - kubectl : Unable to connect to the server : dial tcp 192. 168.214.136:6443:连接:主机没有路由,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56220392/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com