Homebrew
Works on Apple Silicon and Intel.
- 1. Installbash
brew install kubectl
Verify install
bash
kubectl version --clientMacPorts
- 1. Installbash
sudo port install kubectl
Direct binary (curl) — Apple Silicon
- 1. Downloadbash
curl -LO "https://dl.k8s.io/release/v1.36.1/bin/darwin/arm64/kubectl" - 2. Verify checksumbash
curl -LO "https://dl.k8s.io/v1.36.1/bin/darwin/arm64/kubectl.sha256" echo "$(cat kubectl.sha256) kubectl" | shasum -a 256 --check - 3. Installbash
chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl sudo chown root: /usr/local/bin/kubectl
Verify install
bash
kubectl version --clientDirect binary (curl) — Intel
- 1. Downloadbash
curl -LO "https://dl.k8s.io/release/v1.36.1/bin/darwin/amd64/kubectl"
Always verify your binary
Treat every command on the internet with care. Each install command here is mirrored from official Kubernetes documentation. When piping a remote script to a shell, click View script to read it first, or download and verify the binary directly using the steps on the Verify page.