feat(okf): run on full Kubernetes with FreeLens for admin

k3s is out. The cluster is upstream Kubernetes installed with kubeadm:
containerd, single control-plane etcd, Calico for NetworkPolicy.

- add the cluster decision and the FreeLens decision
- move Terraform from the k3s service to kubeadm, Calico, metrics-server
  and the local-path provisioner
- budget ~900 MB for the control plane and plan a bigger machine before 0.3.0
- note kubelet failSwapOn and containerd hosts.toml
- rename 0.3.0 and commit the 0.2.0 done-when to the new stack
- update the German learning plan
This commit is contained in:
Noel Sabia committed 2026-10-24 19:02:17 +02:00
1 parent 6ab76c2a36
commit e022c30527
17 files changed
+214 -64

No files matched your search

+9 -9
View File
@@ -19,7 +19,7 @@ generated: { by: claude-code/claude-opus-5-5, at: 2026-10-14T00:00:00Z }
|---|---|---|
| 0.1.0 | Chapter service | 1-2 |
| 0.2.0 | Terraform server | 2-3 |
| 0.3.0 | Chapters on k3s | 2 |
| 0.3.0 | Chapters on Kubernetes | 2 |
| 0.4.0 | Reverse proxy and DNS | 1-2 |
| 0.5.0 | Pipeline | 2 |
| 0.6.0 | Live states | 2-3 |
@@ -44,8 +44,7 @@ generated: { by: claude-code/claude-opus-5-5, at: 2026-10-14T00:00:00Z }
Each release is cut by release-please from `feat:` commits. A release is done
when its "done when" check passes on the real cluster, not locally.
Everything runs on a 2 vCPU, 4 GB server shared with Gitea. Every release
stays inside the [memory budget](/architecture/server-budget.md).
Everything runs on a small home server shared with Gitea; a bigger machine (8 GB or a second server) arrives before 0.3.0 because the kubeadm control plane needs more room than k3s did. Every release stays inside the [memory budget](/architecture/server-budget.md).
---
@@ -62,13 +61,14 @@ stays inside the [memory budget](/architecture/server-budget.md).
## 0.2.0 Terraform server
- Terraform module that rebuilds server0 from nothing: packages, 2 GB swap file, k3s installed with traefik and servicelb disabled, kubelet reservations, and the `imagePullSecret` for the Gitea registry. See [terraform provisioning](/architecture/terraform.md).
- Terraform also creates namespace `cv` with the ResourceQuota (384Mi) and LimitRange, and the DNS A record for the apex domain.
- Terraform module that rebuilds server0 from nothing: packages, 2 GB swap file, containerd, `kubeadm init` with a single control plane, Calico, kubelet reservations, and the `imagePullSecret` for the Gitea registry. See [terraform provisioning](/architecture/terraform.md).
- Terraform also installs `metrics-server` and the local-path provisioner, creates namespace `cv` with the ResourceQuota (384Mi) and LimitRange, and creates the DNS A record for the apex domain.
- FreeLens on Noel's laptop points at `127.0.0.1:6443` through an SSH tunnel. See [FreeLens](/decisions/freelens-admin-ui.md).
- State file stays local; `plan` output is reviewed before every apply.
- **Done when:** `terraform destroy` then `terraform apply` on a blank server0 leaves k3s running, swap active, namespace `cv` with its quota on a fresh server. No hand steps.
- **Learn:** Terraform (providers, provisioners, plan/apply, state), cloud-init/SSH provisioning, why infra as code beats hand setup.
- **Done when:** `terraform destroy` then `terraform apply` on a blank server0 leaves a Ready control plane with Calico, metrics-server and namespace `cv` with its quota, FreeLens shows the node and the namespace over the tunnel, and swap is active. No hand steps. Requires the bigger machine from [open questions](/decisions/open-questions.md).
- **Learn:** Terraform (providers, provisioners, plan/apply, state), cloud-init/SSH provisioning, kubeadm and containerd, why infra as code beats hand setup.
## 0.3.0 Chapters on k3s
## 0.3.0 Chapters on Kubernetes
- Four placeholder chapters applied with `kubectl apply -k deploy/`: one Job (`complete`), one each of `healthy`, `not-ready`, `crash`.
- Services with `publishNotReadyAddresses: true`, resource limits, pod label `cv.noelsabia.dev/chapter`.
@@ -187,7 +187,7 @@ stays inside the [memory budget](/architecture/server-budget.md).
## 1.9.0 HPA demo
- HPA on one chapter using metrics-server (ships with k3s), max 3 replicas, live replica count and latency graph during a k6 run.
- HPA on one chapter using metrics-server (installed by the 0.2.0 module), max 3 replicas, live replica count and latency graph during a k6 run.
- **Done when:** replicas go up during a run and back down after.
## 1.10.0 LM: bigger base model