kubernetes:基于ab的压力测试


基于ab的压力测试

# cat apache-test.yaml 
##########################################################################
#Author:                     zisefeizhu
#QQ:                         2********0
#Date:                       2020-08-03
#FileName:                   apache-test.yaml
#URL:                        https://www.cnblogs.com/zisefeizhu/
#Description:                The test script
#Copyright (C):              2020 All rights reserved
###########################################################################
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: apache
  namespace: default
  labels:
    name: apache

spec:
  #replicas: 3  #起的pod数    
  selector:
    matchLabels:
      name: apache
  template:
    metadata:
      labels:
        name: apache
    spec:
      containers:
      - name: apache
        image: httpd   #使用镜像
        command: ["ab","-c 30","-n 100000"]    #执行命令
        args: ["https://xxx.xxxxx.com/"]    #压测域名
        ports:
        - name: http
          containerPort: 80

写此的主要原因是在于spec.template.containers. 下的command和args字段的使用


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM