Bash scripts and Ansible playbooks to proof-of-concept local Alpine Linux Kubernetes nodes
- Local (no "free"-tier AWS/Azure/GCP/Oracle//IBM Cloud/requiring submitting payment details)
- Alpine Linux host nodes
- No Docker
- Cilium (see Caveats)
- Vagrant
- Ansible
- sh and awk
(Several stem from $work. Also: which parts of deploying K8s are enabled/smoothed by systemd?)
- 4+ virtual CPU cores
- 16+ GiB RAM
- 25+ GiB disk
- systemd-based
- VirtualBox 6.1+
- Ansible (-base 2.10.7+, << 2.11; see Caveats) with
community.general
andansible.posix
galaxy collections - Vagrant 2.2+ with
vagrant-reload
andvagrant-sshfs
plugins
(Of course, you also can modify the scripts and playbooks with replacements for systemd and VirtualBox, thereby rendering it viable on myriad platforms.)
Clone this repo, then create vagrant_loc
in it with the fully qualified path to the vagrant executable, e.g.,
v=/usr/bin/vagrant
In Vagrantfile
, adjust the host-only private_network
/24 CIDR as necessary. As of VirtualBox 6.1.30, also add this CIDR to /etc/vbox/networks.conf.
If you change it, modify apiserver
in roles/common/vars/main.yml
and metallb_alloc_cidr
in roles/control_planes/vars/main.yml
appropriately.
To provision the nodes: use either standard Terraform commands, or invoke to_parll.sh
.
Versioned URIs in the Ansible playbooks should be OK, but "latest" URLs will break since they're associated with SHA256sums.
If using Mitogen v0.3.0 on the host with Ansible (see this note and these GitHub tags), use the python2 Alpine apk (instead of python3) in the shell provision section of Vagrantfile
. On the host, PyPy* 7.3.8 do not work with Mitogen; you'll need to use CPython (tested with 3.10).
Cilium is configured to encipher inter-node traffic using WireGuard(tm), so expect several of the cilium connectivity test
s to fail.
Using host kernels newer than 5.16 will likely exhibit Cilium deployment failure due to changes in eBPF.
Deploying the Linkerd2 edge-21.9.3 viz extension in a v1.22.2 cluster errors out; this is a policy CRD v1beta1 interaction. (fixed in edge-21.9.4)
Items in this repository are released into the public domain, AKA "The Unlicense," as per https://choosealicense.com/licenses/unlicense/
"WireGuard" is a registered trademark of Jason A. Donenfeld; and all others, of their respective holders.