Open lavelle96 opened 2 years ago
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
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
andKREW_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?
@edeNFed Having the same issue
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
Hello,
I'm having trouble installing flame on my macbook with an M1 chip, encountering this issue
Is anyone else having this issue? If it's a known issue, any idea if there will be a fix?