Kubernetes the hard way on bare metal/VMs — V1.12

An all encompassing series designed for beginners. From VM configuration to K8S cluster building.

Kubernetes Logo


Read the docs

Setting up the resources

Configuring your VMs

VMs used in this tutorial.

Operating System



Some info you’ll need later

cat << EOF | sudo tee /etc/hosts k8s-lb k8s-controllers-lb controller-0 controller-1 controller-2 worker-0 worker-1 worker-2

Installing packages

mkdir ~/k8s-the-hard-way-bare-metal
cd ~/k8s-the-hard-way-bare-metal

Get kubectl

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

Setting up the Kubernetes Cluster

sudo apt install conntrack socat -y

Setting up cfssl & generating configs

Generate kubeconfigs and encryption key

Configuring controllers

Configuring the load balancer

Configuring the workers

Configure remote access

Configuring DNS

Testing the cluster


Kubernetes Admin/Pretend developer. Did I earn a coffee? If so here’s my eth address: 0x58d1c4407B2ED475C807A571572680E0c6ac3685