我正在尝试做一个在 pod 上运行 sysbench 的工作。首先,我使用下一个 yaml 完成工作:
apiVersion: batch/v1
kind: Job
metadata:
name: sysbench-prepare
spec:
template:
metadata:
name: sysbench-prepare
spec:
containers:
- name: sysbench-prepare
image: severalnines/sysbench
command:
- sysbench
- --db-driver=mysql
- --oltp-table-size=100000
- --oltp-tables-count=24
- --threads=1
- --mysql-host=localhost
- --mysql-port=3306
- --mysql-user=sbtest
- --mysql-password=password
- /usr/share/sysbench/tests/include/oltp_legacy/parallel_prepare.lua
- run
restartPolicy: Never
显然,它的创建没有问题
pi@k8s-master-rasp4:~ $ kubectl get jobs
NAME COMPLETIONS DURATION AGE
sysbench-prepare 0/1 33m 33m
这是 pod 的 yaml
apiVersion: v1
kind: Pod
metadata:
labels:
app: sysbench
name: sysbench
spec:
containers:
- command:
- sysbench
- --db-driver=mysql
- --report-interval=2
- --mysql-table-engine=innodb
- --oltp-table-size=100000
- --oltp-tables-count=24
- --threads=64
- --time=99999
- --mysql-host=localhost
- --mysql-port=3306
- --mysql-user=sbtest
- --mysql-password=password
- /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua
- run
image: severalnines/sysbench
name: sysbench
restartPolicy: Never
这是创建后的状态
pi@k8s-master-rasp4:~ $ kubectl get pods
NAME READY STATUS RESTARTS AGE
sysbench 0/1 Error 0 66s
sysbench-prepare-4st28 0/1 Error 0 56s
sysbench-prepare-88kcd 0/1 Error 0 61s
sysbench-prepare-kbk5c 0/1 Error 0 46s
sysbench-prepare-zrv95 0/1 Error 0 6s
日志显示此错误:
pi@k8s-master-rasp4:~ $ kubectl logs -f sysbench
standard_init_linux.go:219: exec user process caused: exec format error
一切都在覆盆子集群上运行,有人知道问题出在哪里吗?谢谢你的时间