Skip to content

Instantly share code, notes, and snippets.

@vyta
Last active August 26, 2020 16:56
Show Gist options
  • Save vyta/0927e2a090c6f8f1c0d9a062326fdd1f to your computer and use it in GitHub Desktop.
Save vyta/0927e2a090c6f8f1c0d9a062326fdd1f to your computer and use it in GitHub Desktop.
Script to prep a Debian node for k8s
#!/bin/sh -eux
# Docker
sudo apt-get update
sudo apt-get install -y\
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install -y\
docker-ce docker-ce-cli containerd.io
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update && sudo apt-get install -y kubeadm kubelet kubectl
# Kubernetes doesn't like swap being on
sudo swapoff -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment