分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

Kubernetes删除namespace后持续terminating状态

发布时间:2023-09-06 02:03责任编辑:董明明关键词:暂无标签

删除isti和foo的配置文件之后,namespace持续terminating状态,此时也无法再创建istio-system的namespace

namespace "istio-system" editedroot@ht:~/istio-0.8.0/install/kubernetes# kubectl get nsNAME ???????????????????STATUS ???????AGEchoerodon-devops-prod ??Active ???????21ddefault ????????????????Active ???????30dfoo ????????????????????Terminating ??11distio-system ???????????Terminating ??19djack-demo ??????????????Active ???????29dkube-public ????????????Active ???????30dkube-system ????????????Active ???????30dsock-shop ??????????????Active ???????22d

此时再删除istio-system也无法删除

root@ht:~/istio-0.8.0/install/kubernetes# kubectl delete ns istio-system
Error from server (Conflict): Operation cannot be fulfilled on namespaces "istio-system": The system is ensuring all content is removed from this namespace. ?Upon completion, this namespace will automatically be purged by the system.

好像是陷入死循环一样

此时查看pod,发现本应该已经被删除的istio系列pod依旧还出现在系统中,并且处于unknowed状态,失联了?

root@ht:~/istio-0.8.0/install/kubernetes# kubectl get pod -n istio-system ?????????????????????????NAME ???????????????????????????????????????READY ????STATUS ???RESTARTS ??AGEistio-ingressgateway-6bc7c7c4bc-zwqmn ??????1/1 ??????Unknown ??0 ?????????19distio-statsd-prom-bridge-6dbb7dcc7f-44gzv ??1/1 ??????Unknown ??0 ?????????19distio-telemetry-54b5bf4847-rn9qj ???????????2/2 ??????Unknown ??0 ?????????19d
root@ht:~/istio-0.8.0/install/kubernetes# kubectl get pods -n fooNAME ??????????????????????READY ????STATUS ???RESTARTS ??AGEhttpbin-68fbcdcfc7-xbf2c ??2/2 ??????Unknown ??0 ?????????11d

推测问题可能出在这

此时用kubetl delete -f 普通删除没有响应,故接下来采用强制删除

root@ht:~/istio-0.8.0/install/kubernetes# kubectl delete pod -n istio-system istio-ingressgateway-6bc7c7c4bc-zwqmn --grace-period=0 --forcewarning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.pod "istio-ingressgateway-6bc7c7c4bc-zwqmn" deletedroot@ht:~/istio-0.8.0/install/kubernetes# kubectl delete pod -n istio-system istio-statsd-prom-bridge-6dbb7dcc7f-44gzv ?--grace-period=0 --force ????????????????????????????????????warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.pod "istio-statsd-prom-bridge-6dbb7dcc7f-44gzv" deletedroot@ht:~/istio-0.8.0/install/kubernetes# kubectl delete pod -n istio-system istio-telemetry-54b5bf4847-rn9qj ?--grace-period=0 --force ?????????????????????????????????????????warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.pod "istio-telemetry-54b5bf4847-rn9qj" deletedroot@ht:~/istio-0.8.0/install/kubernetes# kubectl delete pod -n foo httpbin-68fbcdcfc7-xbf2c --grace-period=0 --forcewarning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.pod "httpbin-68fbcdcfc7-xbf2c" deleted

一开始还是出现terminating的状态,等待一会后就会发现系统恢复正常

root@ht:/etc/kubernetes# kubectl get ns -o wideNAME ???????????????????STATUS ???AGEchoerodon-devops-prod ??Active ???21ddefault ????????????????Active ???30djack-demo ??????????????Active ???29dkube-public ????????????Active ???30dkube-system ????????????Active ???30dsock-shop ??????????????Active ???22d

Kubernetes删除namespace后持续terminating状态

原文地址:https://www.cnblogs.com/yuxiaoba/p/9280130.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved