Skip to content

Commit

Permalink
Create install-kubectl-mac.sh
Browse files Browse the repository at this point in the history
New script for macOS with support for ARM64 architecture
  • Loading branch information
ErikHeggeli authored Oct 4, 2024
1 parent a587f3d commit a06de90
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/install-kubectl-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -eu
umask 077

api_url="https://storage.googleapis.com/kubernetes-release/release"
version="$(curl -s ${api_url}/stable.txt)"
platform="$(uname -s | tr "[:upper:]" "[:lower:]")"

mkdir -p /tmp/kubectl && cd /tmp/kubectl
curl -LO "${api_url}/${version}/bin/${platform}/arm64/kubectl"
chmod +x kubectl
sudo mkdir -p /usr/local/bin
sudo mv kubectl /usr/local/bin/

0 comments on commit a06de90

Please sign in to comment.