-
-
Save thedigitaloctopus/c460667eccd440bfcffb3c79b8908bbb to your computer and use it in GitHub Desktop.
Script to install things (kind, docker, clusterctl, kubectl) ready to run CAPI in kinD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment