Kubernetes删除namespace后持续terminating状态

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

namespace "istio-system" edited
[email protected]:~/istio-0.8.0/install/kubernetes# kubectl get ns
NAME                    STATUS        AGE
choerodon-devops-prod   Active        21d
default                 Active        30d
foo                     Terminating   11d
istio-system            Terminating   19d
jack-demo               Active        29d
kube-public             Active        30d
kube-system             Active        30d
sock-shop               Active        22d

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

[email protected]:~/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状态,失联了?

[email protected]:~/istio-0.8.0/install/kubernetes# kubectl get pod -n istio-system
NAME                                        READY     STATUS    RESTARTS   AGE
istio-ingressgateway-6bc7c7c4bc-zwqmn       1/1       Unknown   0          19d
istio-statsd-prom-bridge-6dbb7dcc7f-44gzv   1/1       Unknown   0          19d
istio-telemetry-54b5bf4847-rn9qj            2/2       Unknown   0          19d
[email protected]:~/istio-0.8.0/install/kubernetes# kubectl get pods -n foo
NAME                       READY     STATUS    RESTARTS   AGE
httpbin-68fbcdcfc7-xbf2c   2/2       Unknown   0          11d

推测问题可能出在这

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

[email protected]:~/istio-0.8.0/install/kubernetes# kubectl delete pod -n istio-system istio-ingressgateway-6bc7c7c4bc-zwqmn --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-ingressgateway-6bc7c7c4bc-zwqmn" deleted
[email protected]:~/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" deleted
[email protected]:~/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" deleted
[email protected]:~/istio-0.8.0/install/kubernetes# kubectl delete pod -n foo httpbin-68fbcdcfc7-xbf2c --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 "httpbin-68fbcdcfc7-xbf2c" deleted

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

[email protected]:/etc/kubernetes# kubectl get ns -o wide
NAME                    STATUS    AGE
choerodon-devops-prod   Active    21d
default                 Active    30d
jack-demo               Active    29d
kube-public             Active    30d
kube-system             Active    30d
sock-shop               Active    22d

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

时间: 2024-10-01 22:22:11

Kubernetes删除namespace后持续terminating状态的相关文章

Kubernetes删除资源后持续terminating状态

Error from server (Forbidden): error when creating "/root/istio.yaml": configmaps "istio-galley-configuration" is forbidden: unable to create new content in namespace istio-system because it is being terminatedError from server (Forbid

Kubernetes强制删除一直处于Terminating状态的pod。

在dashboard界面删除容器,发现无法删除.使用命令查看发现该pod一直处于terminating的状态Kubernetes强制删除一直处于Terminating状态的pod. 1.使用命令获取pod的名字kubectl get po -n NAMESPACE |grep Terminating2.使用kubectl中的强制删除命令kubectl delete pod podName -n NAMESPACE --force --grace-period=0 原文地址:https://blo

k8s删除pod一直处于terminating状态

用的nfs挂载卷,当删除pv后再删除pod时,pod一直处于terminating状态. 如下图: 解决方法: 可使用kubectl中的强制删除命令 # 删除POD kubectl delete pod [pod name] --force --grace-period=0 -n [namespace] # 删除NAMESPACE kubectl delete namespace NAMESPACENAME --force --grace-period=0 若以上方法无法删除,可使用第二种方法,

K8S-删除Terminating状态的namespace

kubernetes 删除Terminating状态的命名空间 1.检查该namespace下是否还有资源: kubectl get all --namespace=cattle-system 2.删除资源: kubectl delete pods <pod> --grace-period=0 --force 3.编辑namespace: kubectl edit ns cattle-system 注释掉finalizers部分,保存即会删除该ns 4.查看查看已被删除: kubectl ge

k8s 删除几种Terminating 状态的pod

删除 查看Terminating 状态 [[email protected] dashboard]# kubectl get ns|grep kubernetes-dashboard kubernetes-dashboard Terminating 26h kubernetes-dashboard-head Terminating 5h57m [[email protected] dashboard]# kubectl get ns kubernetes-dashboard -o yamlapi

Kubernetes中Namespace与Pod

一.Namespace 1)Namespace概述 Namespace是对一组资源和对象的抽象集合,比如可以用来将系统内部的对象划分为不同的项目组或用户组.常见的pods, services, replication controllers和deployments等都是属于某一个namespace的(默认是default),而node, persistentVolumes等则不属于任何namespace. Namespace常用来隔离不同的用户,比如Kubernetes自带的服务一般运行在kub

Kubernetes PV在Retain策略Released状态下重新分配到PVC恢复数据

Kubernetes PV在Retain策略Released状态下重新分配到PVC恢复数据 [TOC] 1. 实验目的和环境说明 原由:在使用helm update stable/sonatype-nexus从1.6版本更新到1.13版本后,出现PVC删除,重新创建PVC的情况,好在原来PV为Retain.故研究下Retain的PV怎么恢复数据. 实验目的:PVC删除后,PV因Retain策略,状态为Released,将PV内数据恢复成PVC,挂载到POD内,达到数据恢复. 环境说明: Kube

linux 删除文件后空间没有释放的解决办法

清空没用的文件,当我删除文件后,发现可用空间沒有变化 os:centos4.7 现象: 发现当前磁盘空间使用情况: [[email protected] ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/sda1             981M  203M  729M  22% /none                   16G     0   16G   0% /dev/shm/dev/sda9    

tableView 删除一行后下一行点击事件被忽略

[转]- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { returnUITableViewCellEditingStyleDelete; } - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEdi