简体   繁体   中英

Error making a job on a kubernetes cluster

I'm trying to make a job that runs sysbench on a pod. First I make the job with the next 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

Apparently, it is created without problem

pi@k8s-master-rasp4:~ $ kubectl get jobs
NAME               COMPLETIONS   DURATION   AGE
sysbench-prepare   0/1           33m        33m

And this is the yaml for the pod

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

And this is the state after creating it

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

The log shows this error:

pi@k8s-master-rasp4:~ $ kubectl logs -f sysbench
standard_init_linux.go:219: exec user process caused: exec format error

Everything is running on a raspberry cluster, anyone knows where could be the problem? Thanks for your time

You're trying to run a linux/amd64 image on an ARM-based system: essentially, the error is saying that doesn't understand how to run instructions since binary and processor are speaking different languages.

You have to find a compatible Docker image for your architecture.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM