• HPA


    [root@ecs-arm-ky-005 hpa]# kubectl get hpa
    NAME               REFERENCE                     TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
    nginx-deployment   Deployment/nginx-deployment   0%/10%    1         10        1          13d
    php-apache         Deployment/php-apache         0%/50%    1         10        1          12d
    [root@ecs-arm-ky-005 hpa]# kubectl get deploy
    NAME               READY   UP-TO-DATE   AVAILABLE   AGE
    nginx-deployment   1/1     1            1           13d
    php-apache         1/1     1            1           2m36s
    [root@ecs-arm-ky-005 hpa]# kubectl run -i --tty load-generator --rm --image=busybox --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://php-apache; done"
    If you don't see a command prompt, try pressing enter.
    OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!O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OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!OK!^Cpod "load-generator" deleted
    pod default/load-generator terminated (Error)
    [root@ecs-arm-ky-005 ~]# kubectl get hpa
    NAME               REFERENCE                     TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
    nginx-deployment   Deployment/nginx-deployment   0%/10%    1         10        1          13d
    php-apache         Deployment/php-apache         0%/50%    1         10        1          12d
    [root@ecs-arm-ky-005 ~]# kubectl get deployment php-apache
    NAME         READY   UP-TO-DATE   AVAILABLE   AGE
    php-apache   1/1     1            1           4m13s
    
    [root@ecs-arm-ky-005 ~]# kubectl get pods -w
    NAME                                READY   STATUS    RESTARTS   AGE
    load-generator                      1/1     Running   0          2m
    nginx-deployment-54999bc69f-747zp   1/1     Running   4          12d
    php-apache-56dd7887d5-4db5p         1/1     Running   0          5m9s
    php-apache-56dd7887d5-5bx7l         1/1     Running   0          14s
    php-apache-56dd7887d5-66zn6         1/1     Running   0          14s
    php-apache-56dd7887d5-q6qsz         1/1     Running   0          14s
    php-apache-56dd7887d5-vp2kx         0/1     Pending   0          0s
    php-apache-56dd7887d5-vp2kx         0/1     Pending   0          0s
    php-apache-56dd7887d5-vp2kx         0/1     ContainerCreating   0          0s
    php-apache-56dd7887d5-vp2kx         1/1     Running             0          2s
    ^C[root@ecs-arm-ky-005 ~]# kubectl get deployment php-apache
    NAME         READY   UP-TO-DATE   AVAILABLE   AGE
    php-apache   5/5     5            5           5m24s
    [root@ecs-arm-ky-005 ~]# kubectl get hpa
    NAME               REFERENCE                     TARGETS    MINPODS   MAXPODS   REPLICAS   AGE
    nginx-deployment   Deployment/nginx-deployment   0%/10%     1         10        1          13d
    php-apache         Deployment/php-apache         250%/50%   1         10        5          12d
    [root@ecs-arm-ky-005 ~]# kubectl get pods -w
    NAME                                READY   STATUS    RESTARTS   AGE
    load-generator                      1/1     Running   0          2m37s
    nginx-deployment-54999bc69f-747zp   1/1     Running   4          12d
    php-apache-56dd7887d5-4db5p         1/1     Running   0          5m46s
    php-apache-56dd7887d5-5bx7l         1/1     Running   0          51s
    php-apache-56dd7887d5-66zn6         1/1     Running   0          51s
    php-apache-56dd7887d5-q6qsz         1/1     Running   0          51s
    php-apache-56dd7887d5-vp2kx         1/1     Running   0          36s
    
    
    
    
    ^C[root@ecs-arm-ky-005 ~]# kubectl get hpa
    NAME               REFERENCE                     TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
    nginx-deployment   Deployment/nginx-deployment   0%/10%    1         10        1          13d
    php-apache         Deployment/php-apache         78%/50%   1         10        5          12d
    [root@ecs-arm-ky-005 ~]# kubectl get pods -o wide
    NAME                                READY   STATUS    RESTARTS   AGE     IP             NODE             NOMINATED NODE   READINESS GATES
    load-generator                      1/1     Running   0          3m31s   10.244.3.112   ecs-arm-ky-002   <none>           <none>
    nginx-deployment-54999bc69f-747zp   1/1     Running   4          12d     10.244.3.99    ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-4db5p         1/1     Running   0          6m40s   10.244.3.111   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-5bx7l         1/1     Running   0          105s    10.244.3.113   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-66zn6         1/1     Running   0          105s    10.244.3.115   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-q6qsz         1/1     Running   0          105s    10.244.3.114   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-vp2kx         1/1     Running   0          90s     10.244.3.116   ecs-arm-ky-002   <none>           <none>
    [root@ecs-arm-ky-005 ~]# kubectl get hpa
    NAME               REFERENCE                     TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
    nginx-deployment   Deployment/nginx-deployment   0%/10%    1         10        1          13d
    php-apache         Deployment/php-apache         78%/50%   1         10        5          12d
    [root@ecs-arm-ky-005 ~]# kubectl get hpa
    NAME               REFERENCE                     TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
    nginx-deployment   Deployment/nginx-deployment   0%/10%    1         10        1          13d
    php-apache         Deployment/php-apache         55%/50%   1         10        5          12d
    [root@ecs-arm-ky-005 ~]# kubectl get pods -o wide
    NAME                                READY   STATUS    RESTARTS   AGE     IP             NODE             NOMINATED NODE   READINESS GATES
    load-generator                      1/1     Running   0          3m58s   10.244.3.112   ecs-arm-ky-002   <none>           <none>
    nginx-deployment-54999bc69f-747zp   1/1     Running   4          12d     10.244.3.99    ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-4db5p         1/1     Running   0          7m7s    10.244.3.111   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-5bx7l         1/1     Running   0          2m12s   10.244.3.113   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-66zn6         1/1     Running   0          2m12s   10.244.3.115   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-q6qsz         1/1     Running   0          2m12s   10.244.3.114   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-vp2kx         1/1     Running   0          117s    10.244.3.116   ecs-arm-ky-002   <none>           <none>
    php-apache-56dd7887d5-zdqtm         1/1     Running   0          11s     10.244.3.117   ecs-arm-ky-002   <none>           <none>
    [root@ecs-arm-ky-005 ~]# kubectl get hpa
    [root@ecs-arm-ky-005 hpa]# kubectl get hpa -w
    NAME               REFERENCE                     TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
    nginx-deployment   Deployment/nginx-deployment   0%/10%    1         10        1          13d
    php-apache         Deployment/php-apache         0%/50%    1         10        6          12d
    php-apache         Deployment/php-apache         0%/50%    1         10        6          12d
    php-apache         Deployment/php-apache         0%/50%    1         10        1          12d
    ^C[root@ecs-arm-ky-005 hpa]# kubectl get hpa
    NAME               REFERENCE                     TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
    nginx-deployment   Deployment/nginx-deployment   0%/10%    1         10        1          13d
    php-apache         Deployment/php-apache         0%/50%    1         10        1          12d
    [root@ecs-arm-ky-005 hpa]# 
  • 相关阅读:
    安卓
    查询
    数据库

    phpcms后台获取当前登录账号的数据的代码:
    phpcms后台批量上传添加图片文章方法详解(一)
    phpcms头部代码详细分析
    网站迁移的方法
    phpcms 修改域名
    外网访问我们配置好的WampServer服务器
  • 原文地址:https://www.cnblogs.com/tian880820/p/16198919.html
Copyright © 2020-2023  润新知