Skip to content

Instantly share code, notes, and snippets.

@chrishham
Last active May 10, 2025 10:01
Show Gist options
  • Save chrishham/283bd8928a42eb5818ede2f8ee4ef6fe to your computer and use it in GitHub Desktop.
Save chrishham/283bd8928a42eb5818ede2f8ee4ef6fe to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e
echo ">>> Updating system and installing dependencies"
apt-get update && apt-get install -y git curl wget unzip python3 python3-yaml
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64" ;;
aarch64) ARCH="arm64" ;;
*) echo "Unsupported architecture: $ARCH" && exit 1 ;;
esac
## Install Azure CLI
curl -sL https://aka.ms/InstallAzureCLIDeb | bash
## Install kubectl
curl -LO "https://dl.k8s.io/release/v1.24.0/bin/linux/${ARCH}/kubectl"
chmod +x ./kubectl
mv ./kubectl /usr/local/bin/kubectl
# Install kubelogin
VERSION=$(curl -s https://api.github.com/repos/Azure/kubelogin/releases/latest | grep '"tag_name"' | cut -d '"' -f 4)
wget "https://github.com/Azure/kubelogin/releases/download/${VERSION}/kubelogin-linux-${ARCH}.zip"
unzip kubelogin-linux-${ARCH}.zip
ls
mv ./bin/linux_${ARCH}/kubelogin /usr/local/bin/
rm kubelogin-linux-${ARCH}.zip
# Install helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment