k8s使用报错
报错内容:
[root@k8s-master ~]# kubectl get nodes
E0903 17:21:22.183325 4630 memcache.go:265] couldn't get current server API group list: Get "https://172.25.250.100:6443/api?timeout=32s": dial tcp 172.25.250.100:6443: connect: connection refused
The connection to the server 172.25.250.100:6443 was refused - did you specify the right host or port?
尝试重启 cri-docker.service 和 kubelet.service服务,发现依然报错
查看服务状态后发现是harbor仓库的问题
在harbor仓库主机上重启harbor后问题就得到了解决
[root@localhost ~]# cd harbor/
[root@localhost harbor]# docker compose down
[root@localhost harbor]# docker compose up -d
####################
[root@k8s-master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s-master Ready control-plane 18h v1.30.0
k8s-node1 Ready <none> 18h v1.30.0
k8s-node2 Ready <none> 18h v1.30.0