Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

641
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda