// Dockerfile FROM openjdk:8-jre-alpine RUN apk add --no-cache xvfb CMD ["sh", "-c", "Xvfb :99 -screen 0 1024x768x16 & && jmeter -n -t /path/to/test.jmx -l /path/to/results.jtl"]
// jmeter.sh Xvfb :99 -screen 0 1024x768x16 & export DISPLAY=:99 exec "${JMETER_BIN}/jmeter" "$@"
apiVersion: v1 kind: Pod metadata: name: jmeter spec: containers: - name: jmeter image: your/jmeter-image command: ["/bin/sh", "-c"] args: - "Xvfb :99 -screen 0 1024x768x16 & && export DISPLAY=:99 && jmeter -n -t /path/to/test.jmx -l /path/to/results.jtl" ports: - containerPort: 80 protocol: TCP volumeMounts: - name: test-files mountPath: /path/to volumes: - name: test-files configMap: name: test-files