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

Introduction

Read the docs

Setting up the resources

Configuring your VMs

VMs used in this tutorial.

Operating System

Network

Firewall

Some info you’ll need later

cat << EOF | sudo tee /etc/hosts
192.168.0.101 k8s-lb
192.168.0.210 k8s-controllers-lb
192.168.0.110 controller-0
192.168.0.111 controller-1
192.168.0.112 controller-2
192.168.0.120 worker-0
192.168.0.121 worker-1
192.168.0.122 worker-2
EOF

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

Conclusion

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