zoukankan      html  css  js  c++  java
  • StatefulSet更新策略

    1.当前版本

    [root@k8s-master01 ~]# kubectl get sts web -oyaml|grep image
                    f:imagePullPolicy: {}
                    f:image: {}
          - image: nginx:1.15.2
            imagePullPolicy: IfNotPresent
    

    2.修改镜像版本

    [root@k8s-master01 ~]# kubectl edit sts web
        spec:
          containers:
          - image: nginx:1.15.4
            imagePullPolicy: IfNotPresent
            name: nginx
            ports:
            - containerPort: 80
    

    3.查看流程

    [root@k8s-master01 ~]# kubectl get pod -l app=nginx -w
    NAME                     READY   STATUS    RESTARTS   AGE
    nginx-6cdd5dd489-bs5wz   1/1     Running   0          4d16h
    nginx-6cdd5dd489-n8xv9   1/1     Running   0          4d16h
    web-0                    1/1     Running   0          3m12s
    web-1                    1/1     Running   0          4m2s
    web-2                    1/1     Running   0          4m36s
    web-2                    1/1     Terminating   0          4m57s
    web-2                    0/1     Terminating   0          4m58s
    web-2                    0/1     Terminating   0          5m10s
    web-2                    0/1     Terminating   0          5m10s
    web-2                    0/1     Pending       0          0s
    web-2                    0/1     Pending       0          0s
    web-2                    0/1     ContainerCreating   0          0s
    web-2                    1/1     Running             0          21s
    web-1                    1/1     Terminating         0          4m57s
    web-1                    0/1     Terminating         0          4m57s
    web-1                    0/1     Terminating         0          5m7s
    web-1                    0/1     Terminating         0          5m7s
    web-1                    0/1     Pending             0          0s
    web-1                    0/1     Pending             0          0s
    web-1                    0/1     ContainerCreating   0          0s
    web-1                    1/1     Running             0          19s
    web-0                    1/1     Terminating         0          4m36s
    web-0                    0/1     Terminating         0          4m37s
    web-0                    0/1     Terminating         0          5m1s
    web-0                    0/1     Terminating         0          5m1s
    web-0                    0/1     Pending             0          0s
    web-0                    0/1     Pending             0          0s
    web-0                    0/1     ContainerCreating   0          0s
    web-0                    1/1     Running             0          20s
    

    4.查看结果

    [root@k8s-master01 ~]# kubectl get sts web -oyaml|grep image
                    f:imagePullPolicy: {}
                    f:image: {}
          - image: nginx:1.15.4
            imagePullPolicy: IfNotPresent
    
  • 相关阅读:
    1.1【基本路由原理】(二层转发原理)1
    NP课前资料2-IOU的传统安装方式
    NP课前资料1-安装GNS3桥接ASA
    1.2 数据仓库的特性
    1-1 事务型处理与分析型处理
    易用性测试关注点(转)
    Jenkins+svn+ant+tomcat持续集成
    并发数计算
    性能测试需求采集
    性能测试指标分析与监控
  • 原文地址:https://www.cnblogs.com/Applogize/p/14397795.html
Copyright © 2011-2022 走看看