[root@master containers]# crictl ps WARN[0000] runtime connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead. WARN[0000] image connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead. E1227 12:51:22.866373 2164 remote_runtime.go:390] "ListContainers with filter from runtime service failed" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory\"" filter="&ContainerFilter{Id:,State:&ContainerStateValue{State:CONTAINER_RUNNING,},PodSandboxId:,LabelSelector:map[string]string{},}" FATA[0000] listing containers: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory"
不过还好,只是进行找不到了,从新添加一下即可,添加后containerd没有问题了。
[root@master containers]# crictl config runtime-endpoint unix:///var/run/cri-dockerd.sock [root@master containers]# crictl config runtime-endpoint unix:///var/run/containerd/containerd.sock [root@master containers]# crictl ps CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID POD 4b48010b2dcaf b4ea7e648530d 6 seconds ago Running kube-controller-manager 22 26ba4294e0252 kube-controller-manager-master 83f1fbf486c4f 404ca3549f735 3 minutes ago Running kube-vip 12 4ee0e697c3b0c kube-vip-master 42f0d0bfc2fe3 18688a72645c5 4 minutes ago Running kube-scheduler 17 da86fb18a55e4 kube-scheduler-master 6f2e43e342b08 e9f4b425f9192 4 minutes ago Running kube-apiserver 34 3eef886681688 kube-apiserver-master 35e9b29935303 aebe758cef4cd 4 minutes ago Running etcd 32 51c6511350234 etcd-master [root@master containers]#
容器可以看了,直接看一下容器的日志文件提示找不到虚拟机的ip,我三个master节点上也没有虚拟ip,这个有点玩大了,如果虚拟ip找不到就相当于整个集群不可用了。
[root@master ~]# kubectl get pod -A Unable to connect to the server: dial tcp 10.211.55.245:6443: connect: no route to host
想着说创建一下这个kube-vip来着,但是我集群中是应该创建好了,而且因为关机造成的整个集群还需要修改配置就不太适合了,后来无意中发现重启一下kubectl,虚拟ip创建上了。主要是我在部署的时候设置了开机自启动,没有必要重启呀。而且我有重启节点的,一样是不可用,
[root@master ~]# kubectl get node NAME STATUS ROLES AGE VERSION master Ready control-plane 11d v1.24.1 node1 Ready control-plane 11d v1.24.1 node2 Ready control-plane 11d v1.24.1 wulaoer Ready <none> 11d v1.24.1
整个集群正常了,后面在出现的一些容器启动一级节点问题就不是什么大事情了,直接重启即可,好了,就写这么多吧。
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏