<p>I am trying to install Kubernetes in Mac. I followed these instructions - <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/tools/install-kubectl/</a> (for MacOs)</p>
<p>Followed all the 5 steps mentioned in that link</p>
<pre><code>1. curl -LO &quot;https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl&quot;

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

echo &quot;$(&lt;kubectl.sha256)  kubectl&quot; | shasum -a 256 --check 

output: kubectl: OK

3. chmod +x ./kubectl

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

5. kubectl version --client
</code></pre>
<p>Apparently, when I executed this kubectl version --client</p>
<p><code>zsh: bad CPU type in executable: kubectl</code></p>
<p>I tried to switch the shell from zsh to sh, bash but nothing helped</p>

<p>For Mac M1 - install Rosetta <code>softwareupdate --install-rosetta</code></p>
<p>Working on my M1 Big Sur 11.5.1</p>
<p>For more info , have a look on this link <a href="https://support.apple.com/en-gb/HT211861" rel="nofollow noreferrer">Rosetta</a></p>
<p>Check this <a href="https://apple.stackexchange.com/questions/408375/zsh-bad-cpu-type-in-executable?newreg=943f42fc6a254d34bb2729742d135920">answer</a></p>
