Last active
October 18, 2019 04:17
-
-
Save kaspernissen/7c412b12eb0084aa96af37241e5d53b4 to your computer and use it in GitHub Desktop.
init.sh
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/sh | |
# Install Docker | |
curl -sSL get.docker.com | sh && \ | |
sudo usermod pi -aG docker | |
# Disable Swap | |
sudo dphys-swapfile swapoff && \ | |
sudo dphys-swapfile uninstall && \ | |
sudo update-rc.d dphys-swapfile remove | |
echo Adding " cgroup_enable=cpuset cgroup_enable=memory" to /boot/cmdline.txt | |
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt | |
# if you encounter problems, try changing cgroup_memory=1 to cgroup_enable=memory. | |
orig="$(head -n1 /boot/cmdline.txt) cgroup_enable=cpuset cgroup_memory=1" | |
echo $orig | sudo tee /boot/cmdline.txt | |
# Add repo list and install kubeadm | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \ | |
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list && \ | |
sudo apt-get update -q && \ | |
sudo apt-get install -qy kubeadm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment