[kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz‘ failed with error:

[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.


root@k8s-master ~]#  journalctl -u kubelet -f
-- Logs begin at 二 2025-07-15 20:18:48 CST. --
7月 16 00:15:52 k8s-master kubelet[109483]: I0716 00:15:52.498552  109483 docker_service.go:243] "Hairpin mode is set" hairpinMode=hairpin-veth
7月 16 00:15:52 k8s-master kubelet[109483]: I0716 00:15:52.498639  109483 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
7月 16 00:15:52 k8s-master kubelet[109483]: I0716 00:15:52.501994  109483 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
7月 16 00:15:52 k8s-master kubelet[109483]: I0716 00:15:52.502045  109483 docker_service.go:258] "Docker cri networking managed by the network plugin" networkPluginName="cni"
7月 16 00:15:52 k8s-master kubelet[109483]: I0716 00:15:52.502102  109483 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
7月 16 00:15:52 k8s-master kubelet[109483]: I0716 00:15:52.505560  109483 docker_service.go:264] "Docker Info" dockerInfo=&{ID:VXEU:QXFJ:OQ7W:SJFX:7IGD:JKXW:QCKK:2ZNZ:KCOO:HA3I:XODW:3SFJ Containers:0 ContainersRunning:0 ContainersPaused:0 ContainersStopped:0 Images:7 Driver:overlay2 DriverStatus:[[Backing Filesystem xfs] [Supports d_type true] [Native Overlay Diff true] [userxattr false]] SystemStatus:[] Plugins:{Volume:[local] Network:[bridge host ipvlan macvlan null overlay] Authorization:[] Log:[awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog]} MemoryLimit:true SwapLimit:true KernelMemory:true KernelMemoryTCP:true CPUCfsPeriod:true CPUCfsQuota:true CPUShares:true CPUSet:true PidsLimit:true IPv4Forwarding:true BridgeNfIptables:true BridgeNfIP6tables:true Debug:false NFd:25 OomKillDisable:true NGoroutines:34 SystemTime:2025-07-16T00:15:52.502340163+08:00 LoggingDriver:json-file CgroupDriver:cgroupfs CgroupVersion:1 NEventsListener:0 KernelVersion:3.10.0-1160.el7.x86_64 OperatingSystem:CentOS Linux 7 (Core) OSVersion:7 OSType:linux Architecture:x86_64 IndexServerAddress:https://index.docker.io/v1/ RegistryConfig:0xc000335570 NCPU:4 MemTotal:3953967104 GenericResources:[] DockerRootDir:/var/lib/docker HTTPProxy: HTTPSProxy: NoProxy: Name:k8s-master Labels:[] ExperimentalBuild:false ServerVersion:20.10.24 ClusterStore: ClusterAdvertise: Runtimes:map[io.containerd.runc.v2:{Path:runc Args:[] Shim:<nil>} io.containerd.runtime.v1.linux:{Path:runc Args:[] Shim:<nil>} runc:{Path:runc Args:[] Shim:<nil>}] DefaultRuntime:runc Swarm:{NodeID: NodeAddr: LocalNodeState:inactive ControlAvailable:false Error: RemoteManagers:[] Nodes:0 Managers:0 Cluster:<nil> Warnings:[]} LiveRestoreEnabled:false Isolation: InitBinary:docker-init ContainerdCommit:{ID:d2d58213f83a351ca8f528a95fbd145f5654e957 Expected:d2d58213f83a351ca8f528a95fbd145f5654e957} RuncCommit:{ID:v1.1.12-0-g51d5e94 Expected:v1.1.12-0-g51d5e94} InitCommit:{ID:de40ad0 Expected:de40ad0} SecurityOptions:[name=seccomp,profile=default] ProductLicense: DefaultAddressPools:[] Warnings:[]}
7月 16 00:15:52 k8s-master kubelet[109483]: E0716 00:15:52.505603  109483 server.go:302] "Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"systemd\" is different from docker cgroup driver: \"cgroupfs\""
7月 16 00:15:52 k8s-master systemd[1]: kubelet.service: main process exited, code=exited, status=1/FAILURE

可能是这个kubelet 的 cgroup 驱动配置为 "systemd",而 Docker 的 cgroup 驱动配置为 "cgroupfs",两者不一致导致 kubelet 启动失败。

重启docker

然后删除初始化的暂留文件,重新初始化即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值