Skip to content

Instantly share code, notes, and snippets.

@nexus166
Last active October 25, 2019 10:27
Show Gist options
  • Select an option

  • Save nexus166/decd46cf8797de7cf133f52ffff7eeeb to your computer and use it in GitHub Desktop.

Select an option

Save nexus166/decd46cf8797de7cf133f52ffff7eeeb to your computer and use it in GitHub Desktop.
  • install basic stuff
apt install -y apt-transport-https arptables ca-certificates ebtables gnupg2 haveged openssl dirmngr
  • add gpg keys & repos, install docker
wget -qO- https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
wget -qO- https://download.docker.com/linux/debian/gpg | apt-key add -
{
  printf 'deb http://apt.kubernetes.io/ kubernetes-xenial main\n';
  printf 'deb [arch=%s] https://download.docker.com/linux/debian buster stable\n' "$(dpkg --print-architecture)";
} | tee -a /etc/apt/sources.list
apt update
apt install -y docker-ce
  • set compatibility executables for kube firewalling
for i in arp eb ip ip6; do update-alternatives --set ${i}tables $(which ${i}tables-legacy); done
  • disable swap
swapoff -a
sed -i '/swap/ s/^#*/#/' /etc/fstab
# on a rpi
systemctl disable dphys-swapfile
  • reboot
  • install kubernetes
apt install -y kubeadm kubelet
  • get token from master (kubeadm token create --print-join-command)
kubeadm join api.adv.addr:6443 --token xxxx.yyyyyyyy --discovery-token-ca-cert-hash sha256:00000000000000000000000000000000000000000000000000000000000000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment