Skip to content

Instantly share code, notes, and snippets.

@Callisto13
Last active May 29, 2023 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Callisto13/617240630944c96730d5151ed308d29a to your computer and use it in GitHub Desktop.
Save Callisto13/617240630944c96730d5151ed308d29a to your computer and use it in GitHub Desktop.
Script to install things (kind, docker, clusterctl, kubectl) ready to run CAPI in kinD
#!/bin/bash -ex
mkdir -p $HOME/installables
pushd $HOME/installables
wget https://github.com/kubernetes-sigs/kind/releases/download/v0.13.0/kind-linux-amd64
chmod +x ./kind-linux-amd64
mv ./kind-linux-amd64 /usr/local/bin/kind
kind --version
apt update
apt install -y \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt install -y docker-ce docker-ce-cli containerd.io
docker version
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
mv ./kubectl /usr/local/bin
kubectl version
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.1.3/clusterctl-linux-amd64 -o clusterctl
chmod +x ./clusterctl
mv ./clusterctl /usr/local/bin/clusterctl
clusterctl version
popd
rm -rf $HOME/installables
@Callisto13
Copy link
Author

I find myself installing these things a lot lately, so this is just to make it faster, I may tidy up in the future.

Can be run quickly with

curl -s https://gist.githubusercontent.com/Callisto13/617240630944c96730d5151ed308d29a/raw/6bf5fbdf7d86ddcab893d6cb4e226461f3cbab9f/installables.sh | bash -s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment