zoukankan      html  css  js  c++  java
  • Kubemark压测常用命令

    1、查看pod信息

    kubectl describe po hollow-node-1693 -n kubemark

    2、描述节点信息

    kubectl describe no izuf6clt44axl097nfxyoaz

    3、分析节点日志

    kubectl logs hollow-node-999 -n kubemark -c hollow-kubelet

    4、查看kubemark资源信息

    kubectl get sts -n kubemark -o yaml

    5、搜索不是Running状态的pod

    kubectl get po -n kubemark | grep -v Running

    6、给hollow-node扩缩容

    kubectl scale sts hollow-node --replicas=3000 -n kubemark

    replicas表示hollow-node的数量

    7、实时查看kubemark的拉起hollow-node进度

    kubectl get po -n kubemark -w

    8、批量操作资源(如pod、node),demo的是删除节点

    kubectl get node | grep hollow-node | awk '{print $1}' | xargs -I{} kubectl delete node {}

    9、删除kubemark里的hollow-node

    kubectl delete po hollow-node-3627 -n kubemark

    10、查看hollow-node的yaml

    kubectl get hollow-node-579 -n kubemark -o yaml 

    11、删除hollow-node的pod

    kubectl get po -n kubemark | grep -v Running |awk '{print $1}' | xargs -I{} kubectl delete pod {}

    12、给hollow-node打标签

    kubectl get node | grep hollow-node | awk '{print $1}' | xargs -I{} kubectl label node {} only-use-for-test-pod=true

    13、给指定的node打标签

    kubectl get no -o wide |egrep "10.197.75.79|10.197.75.80|10.197.75.81|10.197.75.82|10.197.75.83|10.197.75.84" | awk '{print $1}' | xargs -i kubectl label node {} only-use-for-kubemark-pod-2=true

    14、给hollow-node打注解

    kubectl get node |grep hollow-node |awk '{print $1}' | xargs -I{} kubectl annotate node {} alibabacloud.com/node-colocation-config='{"beoverquotamem":1,"reservationcpu":0.3,"enableColocation":true,"beoverquotacpu":1,"ioPressureUtil":1,"reservationmem":0.3,"networkOutboundPressure":0,"networkInboundPressure":0}'

    15、去除标签

    demo是去除了所有节点的标签:not-hollow-node=

    kubectl get node | awk '{print $1}' | xargs -I{} kubectl label nodes {} not-hollow-node-

    人生的路还很长,继续走吧
  • 相关阅读:
    C# 文件类的操作---删除
    C#实现Zip压缩解压实例
    UVALIVE 2431 Binary Stirling Numbers
    UVA 10570 meeting with aliens
    UVA 306 Cipher
    UVA 10994 Simple Addition
    UVA 696 How Many Knights
    UVA 10205 Stack 'em Up
    UVA 11125 Arrange Some Marbles
    UVA 10912 Simple Minded Hashing
  • 原文地址:https://www.cnblogs.com/jinggs/p/14864223.html
Copyright © 2011-2022 走看看