Last active
May 22, 2018 22:43
-
-
Save nicklasfrahm/db9736533577916b2f768f4e4aace827 to your computer and use it in GitHub Desktop.
Install docker and kubernetes toolchain
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
#!/usr/bin/env bash | |
# check if script is run via sudo | |
if [ "$EUID" -ne 0 ] | |
then echo "This script must be run via sudo." | |
exit | |
fi | |
echo "" | |
echo ">> Updating package list ..." | |
echo "" | |
sudo apt update | |
echo "" | |
echo ">> Installing docker-ce dependencies ..." | |
echo "" | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
echo "" | |
echo ">> Fetching docker-ce GPG key ..." | |
echo "" | |
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
echo "" | |
echo ">> Verifying docker-ce fingerprint ..." | |
echo "" | |
sudo apt-key fingerprint 0EBFCD88 | |
echo "" | |
echo ">> Adding docker-ce apt repository ..." | |
echo "" | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
echo "" | |
echo ">> Updating package list ..." | |
echo "" | |
sudo apt update | |
echo "" | |
echo ">> Installing docker version 17.03.2 ..." | |
echo "" | |
sudo apt install docker-ce=17.03.2~ce-0~ubuntu-xenial | |
echo "" | |
echo ">> Fetching kubernetes toolchain GPG key ..." | |
echo "" | |
sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
echo "" | |
echo ">> Creating kubernetes toolchain package list ..." | |
echo "" | |
sudo echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list | |
echo "" | |
echo ">> Updating package list ..." | |
echo "" | |
sudo apt update | |
echo "" | |
echo ">> Installing kubernetes toolchain ..." | |
echo "" | |
sudo apt install kubelet kubeadm kubernetes-cni |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment