first commit
This commit is contained in:
commit
ba848e218d
1001 changed files with 152333 additions and 0 deletions
22
CloudNative/ErrorProcess/解决Terminating状态的Pod删不掉的问题.md
Normal file
22
CloudNative/ErrorProcess/解决Terminating状态的Pod删不掉的问题.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
#### 1,问题描述
|
||||
1、最近发现咋 Kubernetes 集群上有个处于 Terminating 状态的 Pod:
|
||||
```
|
||||
[ec2-user@k8s-master01 ~]$ kubectl get pod -n infra
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
jenkins-5c54cf5557-nz4l2 1/1 Terminating 2 (8d ago) 14d
|
||||
```
|
||||
2、使用命令删除不动
|
||||
```
|
||||
[ec2-user@k8s-master01 ~]$ kubectl delete pod -n infra jenkins-5c54cf5557-nz4l2
|
||||
pod "jenkins-5c54cf5557-nz4l2" deleted
|
||||
|
||||
```
|
||||
#### 2,解决办法
|
||||
1、无论各种方式生成的 pod, 均可以使用如下命令强制删除:
|
||||
```
|
||||
kubectl delete pods <pod> --grace-period=0 --force
|
||||
```
|
||||
2、以上pod删除命令如下
|
||||
```
|
||||
kubectl delete pod -n infra jenkins-5c54cf5557-nz4l2 --grace-period=0 --force
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue