k3s on mulitpass (MacOS) download the wrong arch image

54 Views Asked by At

Trying to install the harness/gitness on MacOS/multipass with k3s but got the error message fork/exec /usr/bin/git: exec format error, try --help. Everything is good if

  1. run the gitness on my MacOS with the native docker environment.
  2. run the gitness on k3s with my Linux-based machine (amd64).

, but it sucks when launching on k3s with MacOS/multipass.

I guess the root cause of the issue is Kubernetes detected the wrong arch on my MacOS/multipass environment. But how do I fix the problem?

The deployment YAML file is simple and the following is the file

---
apiVersion: apps/v1
kind: Deployment

metadata:
  name: gitness
  labels:
    app: gitness

spec:
  replicas: 1

  selector:
    matchLabels:
      app: gitness
  template:
    metadata:
      labels:
        app: gitness

    spec:
      containers:
        - image: harness/gitness:v3.0.0-beta.3
          name: gitness
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: 3000
              scheme: HTTP
            initialDelaySeconds: 3
            periodSeconds: 3
            successThreshold: 1
            timeoutSeconds: 1
1

There are 1 best solutions below

0
On

Finally, I do all the steps correctly but the gitness doesn't. Related issue is https://github.com/harness/gitness/issues/3394 and the official arm64 image is amd64...