【问题解决】[kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz‘ failed wite
故障
报错:[kubelet-check] 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.
原因:执行初始化安装命令
kubeadm init …
报错故障:
[etcd] Creating static Pod manifest for local etcd in “/etc/kubernetes/manifests”
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory “/etc/kubernetes/manifests”. This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.
[kubelet-check] It seems like the kubelet isn’t running or healthy.
[kubelet-check] 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.
[kubelet-check] It seems like the kubelet isn’t running or healthy.
[kubelet-check] 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.
[kubelet-check] It seems like the kubelet isn’t running or healthy.
[kubelet-check] 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.
[kubelet-check] It seems like the kubelet isn’t running or healthy.
[kubelet-check] 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.
[kubelet-check] It seems like the kubelet isn’t running or healthy.
[kubelet-check] 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驱动程序默认设置为system。默认情况下Kubernetes cgroup为systemd,我们需要更改Docker cgroup驱动,
解决方法
添加以下内容
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
相关文章
- HTTPS和SSL优化使用心得之:减少等待时间与降低Https性能损耗(Apache/Nginx)
- Nginx漏洞修复:SSL/TLS 服务器瞬时 Diffie-Hellman 公共密钥过弱
- 使用Let's Encrypt 安装配置免费SSL 证书教程
- [C#]用HttpWebRequest加载证书建立SSL通道时发生异常的解决办法
- 搭建docker内网私服(docker-registry with nginx&ssl on centos)
- 如何给腾讯云域名申请免费的SSL证书
- Android 4.4 网络请求报错:javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL hand
- Push failed Unable to access ‘url‘: OpenSSL SSL_read: Connection was reset, errno 10054
- ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- SSL 证书配置nginx
- wireshark 导出tls ssl证书
- python dpkt SSL 流tcp payload(从三次握手开始到application data)和证书提取
- ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:748) Pytorch下载VGG时的错误
- openssl: 错误SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED