Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

639
Views
zsh: bad CPU type in executable: kubectl (macOS Big Sur)

I am trying to install Kubernetes in Mac. I followed these instructions - https://kubernetes.io/docs/tasks/tools/install-kubectl/ (for MacOs)

Followed all the 5 steps mentioned in that link

1. curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"

2.curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl.sha256"

echo "$(<kubectl.sha256)  kubectl" | shasum -a 256 --check 

output: kubectl: OK

3. chmod +x ./kubectl

4. sudo mv ./kubectl /usr/local/bin/kubectl && \
sudo chown root: /usr/local/bin/kubectl

5. kubectl version --client

Apparently, when I executed this kubectl version --client

zsh: bad CPU type in executable: kubectl

I tried to switch the shell from zsh to sh, bash but nothing helped

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

For Mac M1 - install Rosetta softwareupdate --install-rosetta

Working on my M1 Big Sur 11.5.1

For more info , have a look on this link Rosetta

Check this answer

over 4 years ago · Santiago Trujillo Report

0

Your are trying to download a version of kubectl for the darmin/amd64 architecture. "Darwin" means, effectively, MacOS, and amd64 refers to Intel and AMD 64-bit processors.

You have an M1 Mac, which famously is built around an ARM processor, unlike the rest of Apple's machines.

You would need to find kubectl built for darwin/arm64. As @DavidMaze suggested, you may be able to obtain that by installing the kubernetes-cli package via Homebrew.

over 4 years ago · Santiago Trujillo Report

0

I also got the same problem. Resolved by following steps:

  • rm /usr/local/bin/kubectl
  • brew install kubectl

Now check command:

  • kubectl version --client
    you will get output something like this:

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:52:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/amd64"}

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!