mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-04 19:46:20 +01:00
fix(k3s): drop Home Manager from test masters
Keep the six node configuration intact while removing the failing user activation from the three control-plane MicroVMs. Update the regression test and current K3s configuration notes.
This commit is contained in:
1 parent
f5f4531fcb
commit
9a6923b4e9
16 files changed
+40
-54
No files matched your search
+10
-25
@@ -36,27 +36,18 @@ activates the guest:
|
||||
just microvm-deploy <guest> <physical-host> <guest-ip>
|
||||
```
|
||||
|
||||
For example, `just microvm-deploy k3s-test-1-master-3 shushou 192.168.5.116`.
|
||||
The recipe installs the runner on the physical host first, then activates the guest with
|
||||
the microvm.nix SSH deployment interface.
|
||||
For example, `just microvm-deploy k3s-test-1-master-3 shushou 192.168.5.116`. The recipe installs
|
||||
the runner on the physical host first, then activates the guest with the microvm.nix SSH deployment
|
||||
interface.
|
||||
|
||||
Use `just build-microvm <guest>` to build a runner without deploying it. Do not replace the guest
|
||||
recipe with a manual symlink operation.
|
||||
Use `just build-microvm <guest>` to build a runner without deploying it. Preserve the guest's
|
||||
`etc.img`, `var.img`, and `home.img` when updating it; they contain its identity and K3s state.
|
||||
|
||||
Do not point `/var/lib/microvms/<name>/current` at a store path built on another machine. Nix store
|
||||
paths are local until their closure is copied to the target host, and a missing runner makes the
|
||||
systemd unit skip startup. Do not delete or recreate `etc.img`, `var.img`, or `home.img`; these
|
||||
images hold the guest identity and K3s state.
|
||||
|
||||
For a cluster rollout, deploy one guest at a time. Before each restart, record the active runner
|
||||
and verify that the new runner exists on the physical host. After each restart, wait for the guest
|
||||
Node to become `Ready`, then check the API VIP `/readyz`, Cilium, storage CSI, and any workload
|
||||
health gates. If a gate fails, restore the recorded runner through the same host access path and
|
||||
start the guest service before proceeding to the next node.
|
||||
|
||||
To move an existing VM over in place, copy the host key and `machine-id` from its disk into
|
||||
`etc.img`, and `/var/lib/rancher/k3s/server` into `var.img`, **before the first boot** — then it
|
||||
keeps its identity and etcd membership instead of bootstrapping a new cluster.
|
||||
For a cluster rollout, deploy one guest at a time. Before each restart, record the active runner and
|
||||
verify that the new runner exists on the physical host. After each restart, wait for the guest Node
|
||||
to become `Ready`, then check the API VIP `/readyz`, Cilium, storage CSI, and any workload health
|
||||
gates. If a gate fails, restore the recorded runner through the same host access path and start the
|
||||
guest service before proceeding to the next node.
|
||||
|
||||
1. `k3s-test-1-master-{1,2,3}` — control plane, running as microVMs; tainted
|
||||
`node-role.kubernetes.io/control-plane:NoSchedule`
|
||||
@@ -74,12 +65,6 @@ from scratch gets it automatically. The workers carry no `node-role.kubernetes.i
|
||||
kubelet refuses to self-assign the reserved `node-role.kubernetes.io/*` labels via `--node-label`,
|
||||
and placement is enforced by the control-plane taint instead.
|
||||
|
||||
## TODO / Known issues
|
||||
|
||||
- **The USB HDD bridge is flaky.** youko's two HDDs sit behind a JMicron JMS567 USB-SATA bridge that
|
||||
keeps resetting (`dmesg` on `youko`). Find out how often it resets and how much it matters before
|
||||
putting anything critical (e.g. an NFS export) on it.
|
||||
|
||||
## Kubernetes Resources
|
||||
|
||||
Kubernetes resources are deployed and managed separately through
|
||||
|
||||
@@ -26,8 +26,7 @@ let
|
||||
# so that the API server can always be accessed even if some nodes are down
|
||||
masterHost = "test-cluster-1.writefor.fun";
|
||||
metricsBindAddress = myvars.networking.hostsAddr.${hostName}.ipv4;
|
||||
# the control plane only runs the control plane; workloads run on the
|
||||
# k3s-test-1-worker-* nodes (labelled node-role.kubernetes.io/worker=true)
|
||||
# Workloads run on the worker nodes; they do not use a reserved worker-role label.
|
||||
nodeTaints = [ "node-role.kubernetes.io/control-plane:NoSchedule" ];
|
||||
|
||||
# k3sExtraArgs = [
|
||||
|
||||
@@ -24,8 +24,7 @@ let
|
||||
# so that the API server can always be accessed even if some nodes are down
|
||||
masterHost = "test-cluster-1.writefor.fun";
|
||||
metricsBindAddress = myvars.networking.hostsAddr.${hostName}.ipv4;
|
||||
# the control plane only runs the control plane; workloads run on the
|
||||
# k3s-test-1-worker-* nodes (labelled node-role.kubernetes.io/worker=true)
|
||||
# Workloads run on the worker nodes; they do not use a reserved worker-role label.
|
||||
nodeTaints = [ "node-role.kubernetes.io/control-plane:NoSchedule" ];
|
||||
};
|
||||
in
|
||||
|
||||
@@ -24,8 +24,7 @@ let
|
||||
# so that the API server can always be accessed even if some nodes are down
|
||||
masterHost = "test-cluster-1.writefor.fun";
|
||||
metricsBindAddress = myvars.networking.hostsAddr.${hostName}.ipv4;
|
||||
# the control plane only runs the control plane; workloads run on the
|
||||
# k3s-test-1-worker-* nodes (labelled node-role.kubernetes.io/worker=true)
|
||||
# Workloads run on the worker nodes; they do not use a reserved worker-role label.
|
||||
nodeTaints = [ "node-role.kubernetes.io/control-plane:NoSchedule" ];
|
||||
};
|
||||
in
|
||||
|
||||
Reference in new issue
Block a user