【问题解决】[kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz‘ failed wite

本文涉及的产品
容器服务 Serverless 版 ACK Serverless,952元额度 多规格
容器服务 Serverless 版 ACK Serverless,317元额度 多规格
简介:

故障

报错:[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
相关实践学习
通过Ingress进行灰度发布
本场景您将运行一个简单的应用,部署一个新的应用用于新的发布,并通过Ingress能力实现灰度发布。
容器应用与集群管理
欢迎来到《容器应用与集群管理》课程,本课程是“云原生容器Clouder认证“系列中的第二阶段。课程将向您介绍与容器集群相关的概念和技术,这些概念和技术可以帮助您了解阿里云容器服务ACK/ACK Serverless的使用。同时,本课程也会向您介绍可以采取的工具、方法和可操作步骤,以帮助您了解如何基于容器服务ACK Serverless构建和管理企业级应用。 学习完本课程后,您将能够: 掌握容器集群、容器编排的基本概念 掌握Kubernetes的基础概念及核心思想 掌握阿里云容器服务ACK/ACK Serverless概念及使用方法 基于容器服务ACK Serverless搭建和管理企业级网站应用
相关文章
|
4月前
|
网络协议 Linux 网络安全
curl(http命令行工具):Linux下最强大的网络数据传输工具
curl(http命令行工具):Linux下最强大的网络数据传输工具
145 0
|
29天前
|
Web App开发 监控 UED
如何解决Angular中的Error: HTTP request failed, call timeout问题
在Angular应用中,遇到HTTP请求超时错误`Error: HTTP request failed, call timeout`时,可通过多种途径解决。首先,可增加请求超时时间,Angular默认无超时限制,设置合理的超时时间如5秒有助于避免长时间等待无响应。其次,检查服务器响应时间,利用开发者工具监控网络请求,优化服务器端代码或调整超时值。最后,确认网络连接稳定性,使用`navigator.onLine`检测网络状态,并在不同网络环境中测试。这些策略共同作用,能够有效提升应用的稳定性和用户体验。
60 1
|
1月前
|
JavaScript Java Spring
http://localhost:8282/user/findsomeuser[object%20Object]
这篇文章介绍了如何在Spring Boot应用中创建一个登录拦截器来检查用户登录状态,并在用户未登录时重定向到登录页面,同时展示了如何在控制器中处理特定请求并显示服务器时间,以及如何使用Thymeleaf在HTML页面中展示这个时间。
|
1月前
|
iOS开发 MacOS Python
【Mac 系统】解决已有清华镜像但出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url
在尝试使用清华镜像创建conda环境时遇到下载超时问题,通过删除原有镜像并添加针对Mac OS的清华镜像解决了该问题。
65 3
|
25天前
|
Python
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
|
3月前
|
小程序
Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)
Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)
|
3月前
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
|
3月前
|
JSON API 数据格式
curl 使用:命令行中的 HTTP 客户端
`curl` 是命令行神器,用于与服务器交互,支持HTTP、HTTPS、FTP等协议。本文教你如何用它做POST请求(-d/--data)、GET请求(-G/-d)、JSON请求(-H 'Content-Type: application/json')和文件上传(-F)。学会这些,轻松测试API、自动化任务。现在就动手试试吧!
30 0
|
4月前
|
存储 Web App开发 安全
如何处理错误消息 HTTP error 421 occurred SSL handshake with github.com
如何处理错误消息 HTTP error 421 occurred SSL handshake with github.com
|
4月前
|
网络协议 安全
【专栏】`curl`是广泛用于网络编程和自动化脚本的命令行工具,支持HTTP、HTTPS等协议
【4月更文挑战第28天】`curl`是广泛用于网络编程和自动化脚本的命令行工具,支持HTTP、HTTPS等协议。在处理大文件或慢速服务器时,设置超时参数至关重要。本文介绍了`curl`的超时参数,如`-m`(最大操作时间)、`-c`(连接超时)、`--dns-timeout`(DNS解析超时)和`-t`(时间条件)。通过示例展示了如何设置这些超时,并提到了一些高级技巧和注意事项,如错误处理和带宽限制。合理设置超时能提高效率和可靠性,对编写健壮的自动化脚本非常有用。
133 0