Member-only story
Setting up a Kubernetes Cluster on Ubuntu
3 min readFeb 7, 2020
First install a vanilla Ubuntu server (18.04 was used in this example). The only option installed was the OpenSSH server so that I could make the machine headless once the initial install was complete.
Set up the network, an example config is below, and then you can reboot the computer and connect to it via ssh.
# Set up network
sudo vi /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
enp11s0:
dhcp4: yes
enp12s0:
addresses: [ 192.168.5.75/24 ]
gateway4: 192.168.5.1
nameservers:
addresses:
- "8.8.8.8"
- "4.4.4.4"
I was using an old Mac Pro (6,1) so I needed to also install an EFI boot-loader. This can be ignored for other platforms.
sudo apt install refind
sudo refind-install
Ubuntu Setup
sudo apt install htop curl gnupg
Docker Setup
sudo apt-get install linux-image-extra-virtual
sudo rebootsudo useradd -s /bin/bash -m kube
sudo passwd kube
sudo usermod -aG sudo kube
echo "kube ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/kube# The following will install 18.09 which is an acceptable version of docker. Latest is recommended (19.03.4) but this requires custom install so we wont bother unless we need it for something later. See https://kubernetes.io/docs/setup/production-environment/container-runtimes/#dockersudo apt install docker.io