zoukankan      html  css  js  c++  java
  • k8s系列分享

    .kubect1.exe get namespaces
    
    .kubect1.exe get pods -n user-center
    
    cluster
    
    component
    
    .kubect1.exe get pods -n user-center -o wide
    
    .kubect1.exe get node
    
    .kubect1.exe get endpoints -n hotel-v

     

    k8s删除pod
    1、先删除pod
    
    2、再删除对应的deployment
    
    否则只是删除pod是不管用的,还会看到pod,因为deployment.yaml文件中定义了副本数量
    
    
    实例如下:
    
    删除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.
    查看指定namespace的pod信息
    kubectl get pods -n namespace
  • 相关阅读:
    树的直径 学习笔记
    SDOJ 3742 黑白图
    【SDOJ 3741】 【poj2528】 Mayor's posters
    SDOJ 3740 Graph
    SDOJ 3696 Tree
    SDOJ 1195 Zhenhuan
    又一次受刺激后的发奋
    html_表单form中的input类型大集合
    js_表格的增删改
    JS_拖拽窗口的实现
  • 原文地址:https://www.cnblogs.com/it-deepinmind/p/12831132.html
Copyright © 2011-2022 走看看