Setting Up Kubernetes On Raspberry Pis - Part 1

This post is focused on preparing the Raspberry Pi’s prior to setting up Kubernetes.

Go back to Part 0 or forward to Part 2

Setup Raspberry Pi

Download Raspbian Stretch Lite

Setup SD Cards

Boot into Pi

Update Hostname

$ sudo raspi-config

Enable SSH

$ sudo raspi-config

Restart the Rashberry Pi

$ sudo reboot

Setup a Static IP

We want to setup static IPs so we know what to SSH into. Either set this up on your DHCP server or/and locally on the Pi.

$ cat >> /etc/dhcpcd.conf
profile static_eth0
static ip_address=
static routers=
static domain_name_servers=

interface eth0
fallback static_eth0

Change static IP address for each Raspberry Pi.

Install Docker

$ curl -sSL | sh && \
  sudo usermod pi -aG docker
$ sudo usermod -aG docker pi

Install Git

$ sudo apt-get install git-core

Disable Swap

$ sudo swapon --summary
$ sudo dphys-swapfile swapoff && \
  sudo dphys-swapfile uninstall && \
  sudo update-rc.d dphys-swapfile remove
$ sudo swapon --summary

Edit /boot/cmdline.txt

$ sudo nano /boot/cmdline.txt
 cgroup_enable=cpuset cgroup_memory=1


$ sudo reboot

Update Your Pi!

$ sudo apt-get update
$ sudo apt-get dist-upgrade

Continue to Part 2