码迷,mamicode.com
首页 > 其他好文 > 详细

k8s中删除pod后仍然存在问题

时间:2019-03-08 16:45:23      阅读:686      评论:0      收藏:0      [点我收藏+]

标签:bec   ble   pre   resources   source   available   get   des   ons   

分析:

是因为删除了pod,但是没有删除对应的deployment,删除对应的deployment即可

实例如下:

删除pod

[root@test2 ~]# kubectl get pod -n jenkins
NAME                        READY     STATUS    RESTARTS   AGE
jenkins2-8698b5449c-grbdm   1/1       Running   0          8s
[root@test2 ~]# kubectl delete pod jenkins2-8698b5449c-grbdm -n jenkins
pod "jenkins2-8698b5449c-grbdm" deleted

查看pod仍然存储

[root@test2 ~]# kubectl get pod -n jenkins
NAME                        READY     STATUS    RESTARTS   AGE
jenkins2-8698b5449c-dbqqb   1/1       Running   0          8s
[root@test2 ~]# 

删除deployment

[root@test2 ~]# kubectl get deployment -n jenkins
NAME       DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
jenkins2   1         1         1            1           17h
[root@test2 ~]# kubectl delete deployment jenkins2 -n jenkins

再次查看pod消失

deployment.extensions "jenkins2" deleted
[root@test2 ~]# kubectl get deployment -n jenkins
No resources found.
[root@test2 ~]# 
[root@test2 ~]# kubectl get pod -n jenkins
No resources found.

 

k8s中删除pod后仍然存在问题

标签:bec   ble   pre   resources   source   available   get   des   ons   

原文地址:https://www.cnblogs.com/effortsing/p/10496512.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!