k8s加入新的master节点出现etcd检查失败
背景:
昨天在建立好新的集群后,出现了新的问题,其中的一台master节点无法正常工作。虽然可以正常使用,但是就出现了单点故障,今天在修复时出现了etcd健康检查自检没通过。
Yesterday, after a new cluster was established, a new problem a problem occurred, and one of the master nodes did not work properly. Although can be used normally, but there is a single point of failure, today in the repair of the etcd health check self-test failed.
对加入集群中时,出现如下报错:
When you join a cluster, the following error occurs
提示 etcd 监控检查失败,查看一下Kubernetes 集群中的 kubeadm 配置信息。
Prompt the etcd monitoring check to fail and review the kubeadm configuration information in the Kubernetes cluster.
[root@master-01 ~]# kubectl describe configmaps kubeadm-config -n kube-system
----
apiEndpoints:
master-01:
advertiseAddress: 10.0.0.11
bindPort: 6443
master-02:
advertiseAddress: 10.0.0.12
bindPort: 6443
master-03:
advertiseAddress: 10.0.0.13
bindPort: 6443
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterStatus
Events: <none>
因为集群搭建的时候,etcd是镜像的方式,在master02上面出现问题后,进行剔除完成后,etcd还是在存储在每个master上面,所以重新添加的时候会得知健康检查失败。
Because when the cluster is built, etcd is mirrored, after the problem on master02, after the cull is completed, etcd is still stored on top of each master, so when you add again, you will learn that the health check failed.
这时就需要进入容器内部进行手动删除这个etcd了,首先获取集群中的etcd pod列表看一下,并进入内部给一个sh窗口。
At this point you need to go inside the container to manually delete this etcd, first get the list of etcd pods in the cluster to see, and go inside to give a sh window
[root@master-01 ~]# kubectl get pods -n kube-system | grep etcd
[root@master-01 ~]# kubectl exec -it etcd-master-03 sh -n kube-system
进入容器后,执行如下操作:
After entering the container, do the following
## 配置环境
$ export ETCDCTL_API=3
$ alias etcdctl='etcdctl --endpoints=https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key'
## 查看 etcd 集群成员列表
$ etcdctl member list
## 删除 etcd 集群成员 master-02
$ etcdctl member remove
## 再次查看 etcd 集群成员列表
$ etcdctl member list
## 退出容器
$ exit
查看列表并删除已不存在的master
View the list and remove the master that no longer exists
再次进行加入master,即可成功。
Join master again and you'll be successful
高新科技园
k8s加入新的master节点出现etcd检查失败的更多相关文章
- K8S踩坑篇-master节点作为node节点加入集群
前面我们二进制部署K8S集群时,三台master节点仅仅作为集群管理节点,所以master节点上中并未部署docker.kubelet.kube-proxy等服务.后来我在部署mertics-serv ...
- 【K8S】基于单Master节点安装K8S集群
写在前面 最近在研究K8S,今天就输出部分研究成果吧,后续也会持续更新. 集群规划 IP 主机名 节点 操作系统版本 192.168.175.101 binghe101 Master CentOS 8 ...
- k8s集群———单master节点2node节点
#部署node节点 ,将kubelet-bootstrap用户绑定到系统集群角色中(颁发证书的最小权限) kubectl create clusterrolebinding kubelet-boots ...
- 记录一个奇葩的问题:k8s集群中master节点上部署一个单节点的nacos,导致master节点状态不在线
情况详细描述; k8s集群,一台master,两台worker 在master节点上部署一个单节点的nacos,导致master节点状态不在线(不论是否修改nacos的默认端口号都会导致master节 ...
- k8s集群之master节点部署
apiserver的部署 api-server的部署脚本 [root@mast-1 k8s]# cat apiserver.sh #!/bin/bash MASTER_ADDRESS=$1 主节点IP ...
- Kubernetes1.91(K8s)安装部署过程(四)--Master节点安装
再次明确下架构: 三台虚拟机 centos 7.4系统,docker为17版本,ip为10.10.90.105到107,其中105位master,接下来的master相关组件安装到此机器上. etc ...
- 排查 k8s 集群 master 节点无法正常工作的问题
搭建的是 k8s 高可用集群,用了 3 台 master 节点,2 台 master 节点宕机后,仅剩的 1 台无法正常工作. 运行 kubectl get nodes 命令出现下面的错误 The c ...
- Kubernetes Master节点灾备恢复操作指南---升级版
本文档简述了Kubernetes主节点灾备恢复的相关步骤,供在发生k8s master崩溃时操作. 就算是在k8s里部署了etcd群集, 主节点控制组件的高可用节点,灾备恢复也是必须要实现的操作,才能 ...
- K8S 使用Kubeadm搭建单个Master节点的Kubernetes(K8S)~本文仅用于测试学习
01.集群规划 系统版本:CentOS Linux release 7.6.1810 (Core) 软件版本:kubeadm.kubernetes-1.15.docker-ce-18.09 硬件要求: ...
- 一键安装基于dns的高可用k8s集群(3节点,etcd https)
在公司,使用dns切换,可能会比keepalived+haproxy,更精简的易维护. 毕竟,高可用只是偶尔切换,不是时时切换. 且dns解析在自己可控时,更不会影响k8s线上使用了. (部分代码,由 ...
随机推荐
- 4组-Alpha冲刺-6/6
一.基本情况 队名:摸鲨鱼小队 组长博客:https://www.cnblogs.com/smallgrape/p/15574385.html 小组人数:8人 二.冲刺概况汇报 组长:许雅萍 过去两天 ...
- Java中String相关知识
String 1.String概述 String代表字符串,Java程序中所有的字符串文字(例如'abc")都被实现为此类的实例,也就是说,Java中所有的双引号字符串都是String类的对 ...
- 洛谷 P1832 A+B Problem(再升级)题解
START: 2021-08-09 15:28:07 题目链接: https://www.luogu.com.cn/problem/P1832 给定一个正整数n,求将其分解成若干个素数之和的方案总数. ...
- 关于php pconnect长连接如何刷新连接的讨论
由于每个pconnect所建立的连接信息和单个进程绑定.线上偶发了redis在某一台机器php-fpm上连接正常而无法进行任何操作的问题. 先说结论 查看redis拓展官方文档 close方法 有一句 ...
- C++11:初始化列表
在老版本的C++中,我们可以比较方便得对结构体.数组等对象利用{}进行初始化,而类变量的初始化则取决于构造函数的形式,例如: struct A { int a, b, c; }; class Foo ...
- [Cisco] Policy Based Routing
在某些情況下,會希望指定特定的來源及目的走特定的出口,卻又不是全部的網段都希望套用,這時就可以透過PBR來達成這個需求. 如以下拓樸 1.1.1.0/24的網路往5.5.5.0的封包需要指定e0/1當 ...
- ARMV8 short notes
offset addressing pre-index addressing define like: load the compass content of the operand 2 to ope ...
- Postman设置Cookie参数为全局变量-环境变量设置IP参数
前提:在遇到多接口测试时,容易出现限制登录的情况 可以使用两种情况: 1.在调用其他接口前,先调用登录接口:这个方法在一般情况下可以,但是对于有些环境,比如像小程序登录时token(或cookie)是 ...
- Go_day02
Go基础语法 流程控制 一共有三种:顺序结构,选择结构,循环结构 if语句 /* if与else if的区别: 1:if无论是否满足条件都会向下执行,直到程序结束,else if 满足一个条件就会停止 ...
- 爬快手,graphql查询语言
graphql查询语言:https://blog.csdn.net/qq_41882147/article/details/82966783 即:前端调用同一个接口传入不同的操作,得到不同的返回值 一 ...