2 comments

  • an hour ago
    [deleted]
  • cyb3ralbert an hour ago

    I walked Kubernetes The Hard Way end to end, and the thing that cost me the most time happened before lab 02: the tutorial opens by asking for four Debian 12 machines and never says where they come from. This is that part.

    It's a thin layer over libvirt — one immutable cloud image per distro, every VM a qcow2 overlay, SSH key injected through cloud-init. kthw-stand-up gives you jumpbox + server + 2 nodes on static IPs, named what the tutorial names them (libvirt domain names are global to the host, so the guest hostname is decoupled from the domain name).

    The decision I'd most like to be argued with about is where it stops. Lab 03 — root SSH, the FQDNs, the shared /etc/hosts, machines.txt — is the body of an exercise, so the stand deliberately doesn't do any of it. It hands over machines built to the lab 01 spec and gets out of the way. Two exceptions, because neither is an exercise:

    1. manage_etc_hosts: false. cloud-init rewrites /etc/hosts from a template on every boot. You do lab 03, add an entry per node, reboot, and they're gone — the cluster comes apart by name with nothing obvious to blame.

    2. net.ipv4.ip_forward=1, which lab 11 needs for the pod routes. br_netfilter and the bridge-nf sysctls are kubeadm's requirements, not this tutorial's, so they're left out.

    One number I couldn't find documented anywhere: 768 MiB and a 10G disk per node carry the server and both nodes through all thirteen labs. 512 doesn't. That puts the whole stand at 2.75 GiB instead of the 6.5 the spec implies — the difference between fitting on a laptop and not.

    Other things that ate a day each: a cdrom seed is invisible to the genericcloud kernel (no cdrom driver), so the seed goes on a virtio disk; --cpu host resolves to a "safe" model without AVX2, and Rocky 10 needs x86-64-v3, so it won't boot; and Rocky's GRUB emits nothing at all without a video device, which is exactly what --graphics none gives you: a VM burning a core with an empty console.

    MIT. There's also a kubeadm-ready node profile with an ansible inventory, but init/join is still manual.