A minimalist script to bootstrap a Kubernetes cluster for learning purpose.
No kubeadm
or other bootstrapping tool (kops
, kubespray
, etc, ...), no Cloud provider (AWS, GCP), only a self-contained Bash script and vagrant
+ VirtualBox.
- Environment:
- Ubuntu 16.04
- Kubernetes 1.12
- The project follows the official documentation Creating a Custom Cluster from Scratch
- Automation is purposely minimal → 1 self-contained shell script simply chaining commands
- All commands should have a link to docs.k8s.io, unless out of K8s scope (e.g. Docker, Ubuntu/Debian) then a link to the third-party documentation
- No cloud provider → Vagrant + VirtualBox
- Iterations:
- Bootstrap a single-node cluster
- Bootstrap a 3-node cluster with 1 master
- Bootstrap a 3-node cluster with 3 masters
- Then we might play a bit:
- Add a few more SSL certs
- Add a network plugin (e.g. Calico, Flannel)
- Spread services across more VMs
- Etc...
Test the script using vagrant
:
vagrant up
vagrant ssh