kubernetes:abベースの圧力テスト

1159 ワード

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フィールドの使用