The connection to the server localhost:8080 was refused - did you specify the right host or port?
解决方法:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused
解决方法
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://q5vcymug.mirror.aliyuncs.com"],
"exec-opts": ["native.cgroupdriver=systemd"]
}
systemctl restart docker
kubeadm reset -f
kubectl get cs
报错:Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10251: connect: connection
解决方法:
vim /etc/kubernetes/manifests/kube-controller-manager.yaml
注释掉27行:# - --port=0
vim /etc/kubernetes/manifests/kube-scheduler.yaml
注释掉19行:# - --port=0
然后master节点重启:kubelet(等待几秒即可)
systemctl restart kubelet.service
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://vitcloud.blog.csdn.net/article/details/124364527
内容来源于网络,如有侵权,请联系作者删除!