开发者社区> 游客bizckxyrg6t5g> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

【问题解决】[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] It seems like the kubelet isn't running or healthy.

[kubelet-check] It seems like the kubelet isn't running or healthy.

[kubelet-check] It seems like the kubelet isn't running or healthy.

[kubelet-check] It seems like the kubelet isn't running or healthy.


问题分析:

之前我的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

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
记录:Failed to auto-configure a DataSource: 'spring.datasource.url'is not...【解决方案】
记录:Failed to auto-configure a DataSource: 'spring.datasource.url'is not...【解决方案】
96 0
Docker-HealthCheck指令探测ASP.NET Core容器健康状态
HealthCheck 不仅是对应用程序内运行情况、数据流通情况进行检查,还包括应用程序对外部服务或依赖资源的健康检查。
70 0
阿里云微服务消息队列MQTT管控 API PHP SDK 测试Quick Start
微消息队列MQTT版是阿里云推出的一款面向移动互联网以及物联网领域的轻量级消息中间件。如果说传统的消息队列中间件一般应用于微服务之间,那么适用于物联网的微消息队列MQTT版则实现了端与云之间的消息传递和真正意义上的万物互联。前面介绍了Java SDK本地调用方法,这里介绍一下PHP SDK快速调用方法。
209 0
What to Expect When Moving From SAP Business Suite to SAP S/4 HANA
What to Expect When Moving From SAP Business Suite to SAP S/4 HANA   http://www.
914 0
android eventbus ui sqlite http
    实战 QQ demo源码(本例中有该应用) 服务器端下载:http://download.csdn.net/download/knight_black_bob/9822551 android eclipse 版:http://download.
612 0
./configure: error: the HTTP rewrite module requires the PCRE library.
CentOS 6.5 下 安装 Tengine 执行配置命令./configure  时提示以下错误: ./configure: error: the HTTP rewrite module requires the PCRE library.
1230 0
How to move ASM spfile to a different disk group [ID 1082943.1]
  How to move ASM spfile to a different disk group [ID 1082943.1] Goal The goal is to move ASM spfile from one disk group to another.
1137 0
81
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载