Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue installing flame on M1 chips #74

Open
lavelle96 opened this issue May 19, 2022 · 5 comments · May be fixed by #87
Open

Issue installing flame on M1 chips #74

lavelle96 opened this issue May 19, 2022 · 5 comments · May be fixed by #87

Comments

@lavelle96
Copy link

Hello,

I'm having trouble installing flame on my macbook with an M1 chip, encountering this issue
image

Is anyone else having this issue? If it's a known issue, any idea if there will be a fix?

@willianmk
Copy link

Hi @lavelle96 ,

There is a workaround for it, as I also faced the same issue, because on their manifest it is limited to amd64 architecture. Setting the env vars KREW_OS and KREW_ARCH worked for me:

KREW_OS="darwin" KREW_ARCH="amd64" kubectl krew install flame

@nishthagoel99
Copy link

Hi @lavelle96 ,

There is a workaround for it, as I also faced the same issue, because on their manifest it is limited to amd64 architecture. Setting the env vars KREW_OS and KREW_ARCH worked for me:

KREW_OS="darwin" KREW_ARCH="amd64" kubectl krew install flame

When i try to run kubectl flame ,it gives

kubectl flame
Error: bad CPU type in executable

How do i solve this?

@anoushk1234
Copy link

@edeNFed Having the same issue

@mandrean mandrean linked a pull request Mar 2, 2023 that will close this issue
@mandrean
Copy link

mandrean commented Mar 2, 2023

Fix: #87

@gokalper
Copy link

gokalper commented May 9, 2024

you can build and install manually on apple silicon :

# CLONE THE REPO

export PLUGIN_VERSION=v0.2.4
export PLUGIN_COMMIT=dede84c3ad0857ce5a53be8aeb09ae70b253fcfa
export PLUGIN_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")

CGO_ENABLED=0 GOOS=darwin go build -ldflags "-X github.com/VerizonMedia/kubectl-flame/cli/cmd/version.semver=$PLUGIN_VERSION -X github.com/VerizonMedia/kubectl-flame/cli/cmd/version.date=$PLUGIN_DATE -X github.com/VerizonMedia/kubectl-flame/cli/cmd/version.commit=$PLUGIN_COMMIT" -o kubectl-flame ./cli/main.go



zip kubectl-flame.zip kubectl-flame LICENSE
export PLUGIN_SHA=$(shasum -a 256 kubectl-flame.zip | awk '{print $1}')

cat <<EOF > manifest.yaml
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
  name: flame
spec:
  version: $PLUGIN_VERSION
  homepage: https://github.com/VerizonMedia/kubectl-flame
  shortDescription: A Kubernetes plugin for flame graph generation.
  platforms:
    - uri: https://localhost:8000/kubectl-flame.zip
      sha256: $PLUGIN_SHA
      bin: kubectl-flame
      files:
        - from: kubectl-flame
          to: .
        - from: LICENSE
          to: .
      selector:
        matchLabels:
          os: darwin
          arch: arm64
EOF

# IN THE ROOT FOLDER RUN
python3 -m http.server

# IN A NEW TERMINAL AT THE ROOL FOLDER RUN
kubectl krew install --manifest=manifest.yaml --archive=kubectl-flame.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants