k8s正确删除pod的方法
[root@k8s-master ~]# kubectl get podsNAMEREADYSTATUSRESTARTSAGEnginx-86c57db685-2nrfp1/1Running048mnginx3-bc84fb766-vh8v51/1Running046m现在我想删除nginx先删除deployment:查询:[root@k8s-ma
·
[root@k8s-master ~]# kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-86c57db685-2nrfp 1/1 Running 0 48m
nginx3-bc84fb766-vh8v5 1/1 Running 0 46m
现在我想删除nginx
先删除deployment:
查询:
[root@k8s-master ~]# kubectl get deployment
NAME READY UP-TO-DATE AVAILABLE AGE
nginx 1/1 1 1 49m
nginx3 1/1 1 1 46m
删除
[root@k8s-master ~]# kubectl delete deployment nginx
deployment.apps "nginx" delete
再次查看:
[root@k8s-master ~]# kubectl get deployment
NAME READY UP-TO-DATE AVAILABLE AGE
nginx3 1/1 1 1 48m
[root@k8s-master ~]# kubectl get rs
NAME DESIRED CURRENT READY AGE
nginx3-bc84fb766 1 1 1 49m
[root@k8s-master ~]# kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx3-bc84fb766-vh8v5 1/1 Running 0 49m
更多推荐
已为社区贡献4条内容
所有评论(0)