Skip to content

Bootstrap Kubernetes the (less) hard way on premise with ansible playbooks.

License

Notifications You must be signed in to change notification settings

eoli3n/kubernetes-the-less-hard-way

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IN PROGRESS

Kubernetes The (Less) Hard Way

Ansible playbooks to learn how to host highly available Kubernetes cluster on premise with no SPOF.

VMs provisionning

Hostname OS for Hard Way OS for Rancher
k8s-controller1 Ubuntu Server 20.04 RancherOS
k8s-controller2 Ubuntu Server 20.04 RancherOS
k8s-controller3 Ubuntu Server 20.04 RancherOS
k8s-worker1 Ubuntu Server 20.04 RancherOS
k8s-worker2 Ubuntu Server 20.04 RancherOS
k8s-worker3 Ubuntu Server 20.04 RancherOS
k8s-loadbalancer1 Debian 10 Debian 10
k8s-loadbalancer2 Debian 10 Debian 10
k8s-storage1 Debian 10 Debian 10
k8s-storage2 Debian 10 Debian 10
k8s-storage3 Debian 10 Debian 10

Network and DNS

All hosts needs a private IP on the same subnet.
Create DNS or hosts file entries for each VM.
Each VMs and your client should be able to resolve all hostnames.

Inventory

cp ansible/hosts.template ansible/hosts

Add all hostnames in ansible/hosts.

Firewall

All trafic between VMs should not be filtered.
To access services from outside, you should open in your firewall:

Service Port Destination
ssh 22/tcp *
kube-apiserver 6443/tcp k8s-haproxy
ingress 80/tcp 443/tcp k8s-haproxy

Run Ansible playbooks

Please read playbooks before running.

Install SSH, authorize your SSH public key, then test if VMs are reachable.

ansible all -m ping
Hard way

Read hard-way.

RKE way

Read rke.

Releases

No releases published

Packages

No packages published