kubernetes:[kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz‘ failed
[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.
背景:
搭建k8s高可用集群,由于自己瞎操作,在初始化master(master-1)时操作失败,于是又换了一个master(master-2)进行初始化,但是又由于其他问题导致失败,于是又换了一台master(master-3)进行初始化,终于成功。于是将前两台的master加入进来,出现以下报错:
[root@kube-master-2 ~]# kubeadm join 192.168.186.100:6444 --token abcdef.0123456789abcdef --discovery-token-ca-cert-hash sha256:96d22a2b958829a6c3039cc4c6f18a2fc8a508486dd9c1d9977d0ccca3b4eb95 --control-plane --certificate-key d8e791cb9b567cec3c2a6cb2f8a1ce197cf108fdfee3e6c8945eb20ebdbc8930
--snip--
[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.
^C
大概的原因应该是由于之前操作初始化的时候导致了环境不干净,造成后面加入集群时出现了问题。
解决:
[root@kube-master-2 ~]# kubeadm reset
[root@kube-master-2 ~]# rm -rf /etc/cni/net.d
[root@kube-master-2 ~]# rm -rf $HOME/.kube/config
[root@kube-master-2 ~]# rm -rf /etc/kubernetes/
然后再次执行加入集群命令
[root@kube-master-1 ~]# kubeadm join 192.168.186.100:6444 --token abcdef.0123456789abcdef --discovery-token-ca-cert-hash sha256:96d22a2b958829a6c3039cc4c6f18a2fc8a508486dd9c1d9977d0ccca3b4eb95 --control-plane --certificate-key d8e791cb9b567cec3c2a6cb2f8a1ce197cf108fdfee3e6c8945eb20ebdbc8930
[preflight] Running pre-flight checks
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[preflight] Running pre-flight checks before initializing the new control plane instance
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[download-certs] Downloading the certificates in Secret "kubeadm-certs" in the "kube-system" Namespace
error execution phase control-plane-prepare/download-certs: error downloading certs: error downloading the secret: Secret "kubeadm-certs" was not found in the "kube-system" Namespace. This Secret might have expired. Please, run `kubeadm init phase upload-certs --upload-certs` on a control plane to generate a new one
To see the stack trace of this error execute with --v=5 or higher
如果出现以上错误,就需要去初始化成功的master重新生成验证消息
[root@kube-master-3 k8s]# kubeadm init phase upload-certs --upload-certs
I0304 15:16:59.221639 95329 version.go:252] remote version is much newer: v1.20.4; falling back to: stable-1.18
W0304 15:17:00.282978 95329 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[upload-certs] Storing the certificates in Secret "kubeadm-certs" in the "kube-system" Namespace
[upload-certs] Using certificate key:
0db707eb72d2282b642cc2f6fe057ae3963cf380a351cc932bfcd424963ce837
然后替换刚刚的验证消息继续执行命令即可。
以上解决问题的过程有点粗糙,估计适用范围不大,可以多多交流。
kubernetes:[kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz‘ failed相关推荐
- 【问题解决】[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 ...
- The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz‘ failed with error: Get “http://loc
一.报错 The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get " ...
- kubernetes kubelet参数
全栈工程师开发手册 (作者:栾鹏) 架构系列文章 概要 kubelet 是运行在每个节点上的主要的"节点代理",每个节点都会启动kubelet进程,用来处理Master节点下发到本 ...
- kubernetes kubelet挂掉问题分析
环境描述 kubernetes 组建的运行方式 kubelet : systemd 运行 其他都是docker起的容器 问题描述 1.有pod状态处于Unknow状态 [root@master-64 ...
- Kubernetes Kubelet 状态更新机制
Kubernetes Kubelet 状态更新机制 tags: kubelet 文章目录 Kubernetes Kubelet 状态更新机制 1. 概览 2. 配置 2.1 社区默认的配置 2.2 快 ...
- Kubernetes K8s 结合国内外文章解决 The kubelet is not running
初学K8s,好好教程不跟着来,非要全部安装最新的docker 和 k8s,经过4小时奋战终于解决! 先说明下docker是最新版的安装,又安装K8s cat > /etc/yum.repos.d ...
- CentOS7系统上Kubernetes集群搭建
虚拟机创建 在自己的Mac系统里面利用Parallels Desktop创建3台虚拟机,具体信息如下: CentOS7-Node1: 10.211.55.7 parallels/centos-test ...
- Kubernetes(K8s)集群安装部署
Kubernetes(K8s)集群安装 Kubernetes(K8s)集群安装 1 .基本环境配置 1.1.Kubernetes集群规划 1.2.基础环境配置(所有节点) 1.2.1.Host文件修改 ...
- kubeadm 部署 kubernetes:v1.23.4集群
一.安装前的准备 !!!以下操作需要在所有master和node上执行 1.1.关闭selinux,关闭防火墙 1.2.添加hosts解析 192.168.122.160 master 192.168 ...
最新文章
- Python加密—AES加密(2)
- traceping是什么意思_trace命令是什么意思?
- 是否会成为问题——Linq to Sql的执行可能无法复用查询计划
- 二叉树的创建及各种遍历
- 关于直播,所有的技术细节都在这里了(二)
- vb webbrowser html源码,VB WebBrowser控件常用源码
- SCTF-2019 Misc wp
- Eviews10.0下载与安装
- FFplay源码分析-rtmp入口
- C语言sar图像几何校正,SAR图像几何校正方法与流程
- mysql 唯一索引为null_mysql 唯一索引与null.md
- 玉米社:抖音玩法和运营机制,学会这些技巧,轻松上热门
- 试试这些方法,误删文件怎么恢复?
- 计算机桌面图标出现蓝色问号,win7系统桌面图标有蓝色问号的解决方法
- 紫外线消毒器的催化反应工艺指南
- flutter全屏背景图(包括appbar和状态栏)以及沉浸状态栏的设置
- 医疗检测机构能力建设指导原则
- CST和GMT时间的区别
- js对象的getter和setter
- 华为鸿蒙os产品,华为鸿蒙OS发布 首先应用于智慧屏产品