問題:
初始化K8S master時報錯
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.
問題分析:
之前我的Docker是用yum安裝的,docker的cgroup驅(qū)動程序默認(rèn)設(shè)置為systemd。默認(rèn)情況下Kubernetes cgroup為system,我們需要更改Docker cgroup驅(qū)動,文章來源:http://www.zghlxwxcb.cn/news/detail-502678.html
解決方法
# 添加以下內(nèi)容
vim /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
# 重啟docker
systemctl restart docker
# 重新初始化
kubeadm reset # 先重置
kubeadm init \
--apiserver-advertise-address=192.168.42.122 \
--image-repository registry.aliyuncs.com/google_containers \
--kubernetes-version v1.22.2 \
--service-cidr=10.96.0.0/12 \
--pod-network-cidr=10.244.0.0/16 \
--ignore-preflight-errors=all
文章來源地址http://www.zghlxwxcb.cn/news/detail-502678.html
到了這里,關(guān)于The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz‘ failed with error: Get “http://loc的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!