timed out waiting for to be synced
程序操作kubernetes资源时, 没有等旧的资源删除完毕就立即创建了同名的新资源, 导致出现了一些错误.
具体表现为kubernetes命令行删除StatefulSet时报错, timed out waiting for "mysql" to be synced, 删除多次卡住, 然后报这个超时错误.
查看这个StatefulSet:
root@kub3:~# kubectl -n admin-d2069c get statefulset mysql -o yaml
...
spec:podManagementPolicy: OrderedReadyreplicas: 0revisionHistoryLimit: 10selector:matchLabels:app: mysqlappname: mysqlname: mysqlserviceName: mysqltemplate:metadata:creationTimestamp: nulllabels:app: mysqlappname: mysqlname: mysqlname: mysql
...
replicas为0, 但是查看其下有两个状态为terminating的pod:
statefulsets/mysql 0 2 19hpo/mysql-0 0/1 Terminating 0 19h
po/mysql-1 0/1 Terminating 0 19h
然后使用如下命令再次进行删除操作:
kubectl -n admin-d2069c delete statefulset mysql --cascade=false
成功.
出现这种情况的原因是, 删除StatefulSet时会级联删除其下pod资源, 然而yaml定义中的replica为0导致了混乱, 使用--cascade=false禁用级联删除则成功, 然后单独删除其下的两个pod.
删除pod时也要注意, 因为正常情况下, StatefulSet负责管理其下的pod而不需要人为干预。所以这里要使用强制删除:
若使用1.5或者更高版本的kubectl强制删除Pod,请执行以下命令:
kubectl delete pods <pod> --grace-period=0 --force
如果您使用1.4或者更低版本的kubectl,需要省略--force选项:
kubectl delete pods <pod> --grace-period=0
timed out waiting for to be synced相关推荐
- 关于 运行root.sh 时出错误Timed out waiting for the CRS stack to start.的解决
Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Adding daemon to inittab C ...
- 【es】es 集群黄色几个索引未分配 timed out waiting for all nodes to published state
1.背景 es集群集群黄色,几个索引未分配,然后es后台日志有多个warn timed out waiting for all nodes to published state GET /_clust ...
- Kafka启动报错:Timed out waiting for connection while in state: CONNECTING
1.美图 1.背景 zookeeper 集群启动没有问题,集群状态也正常,但是启动kafka 确报了这个错误: Timed out waiting for connection while in st ...
- Unable to attach or mount volumes ... timed out waiting for the condition
k8s pod一直起不起来,遇到这个错误: Unable to attach or mount volumes: unmounted volumes=[data], unattached volume ...
- Conmi的正确答案——Unable to attach or mount volumes: unmounted volum...timed out waiting for the condition
k8s:v1.22.12 kubesphere版本:v3.3 完整错误信息: Unable to attach or mount volumes: unmounted volumes=[prometh ...
- VNC Timed out waiting for a response from the computer
最近在阿里云服务器ECS上安装了图形界面和VNC Server,参考:CentOS6.5下安装远程桌面服务端软件VNC Server 但是连接的时候却提示:VNC Timed out waiting ...
- A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
正确方式 事情是这样的,我的esp32今天到货了,于是开始下起程序来,第一次等了好久好久. 最后报错: A fatal error occurred: Failed to connect to ESP ...
- esp32烧录的时候出现报错Chip sync error :Failed to connect to ESP32: Timed out waiting for packet heade
Chip sync error : Failed to connect to ESP32: Timed out waiting for packet header ESP32 Chip sync er ...
- Mycat JVM appears hung: Timed out waiting for signal from JVM.
Mycat配置支持的JVM参数是支持1.8_x之前的版本,当JDK升级到1.8_x以后在大数据量操作的时候JVM内存的分配就会存在问题,我们需要做相应的调整以适应这种参数改变,JDK 1.8_x不支持 ...
最新文章
- codefores 786B. Legacy(最短路,线段树优化拆点,好题)
- Centos 7 yum 安装php
- 服务器返回的信息无效或无法识别的响应,c# - 服务器从Visual Studio返回了无效或无法识别的响应错误 - 堆栈内存溢出...
- 【深度学习笔记】Windows 下 pip 安装paddle.fluid
- SAP Spartacus b2b table,通过listService的table type字段来控制要加载的数据类型
- 【theano-windows】学习笔记七——logistic回归
- Linux内核 触摸板,Linux下关闭触摸板和触摸杆
- Java线程池在业务中的实践
- Inpaint破解版 - 图片去水印神器
- WIN10删除微软拼音输入法,设置默认输入法为英文
- windows安装memcached
- 三个技巧教你怎么裁剪视频画面,手残党也能掌握
- 使用Python对GIF读取、生成、压缩和加水印
- 鸿蒙os和vivo新系统,跳过鸿蒙系统后,中兴给出新选择,魅族和vivo却坐不住了...
- LEX自动生成词法分析器
- 简单分析一个通过 js 劫持进行案例
- 第 01 章:开篇介绍,我要带你撸 Spring 啦!
- 一文读懂知识图谱的主要技术
- Python小虫收集箱
- 产品读书《怪诞行为学》