Files
nix-config/hosts/k8s
ryan4yin | 二花 f8d12ada24 feat(btrbk): make snapshots explicit, guarded, and stored in @snapshots (#271)
* feat(btrbk): make snapshots explicit and guarded

Replace the always-on, hardcoded module with modules.btrbk options (enable/volume/subvolume/snapshotDir/target/onCalendar), and assert the btrfs top-level subvolume is mounted so a missing mount fails evaluation instead of silently failing at runtime.

Store snapshots in the @snapshots subvolume (snapshot_dir=@snapshots) rather than next to the live subvolume, make the off-host target explicit and off by default, and document that local snapshots are not off-host backups.

Enable the feature explicitly on idols-ai, shoukei and the three kubevirt hosts; qemu-guest now disables it through the option. Add eval tests for shoukei and ai.

* feat(monitoring): alert on btrbk snapshot failure

Add HostBtrbkSnapshotFailed on node_systemd_unit_state for btrbk-btrbk.service, so a broken snapshot schedule alerts instead of only surfacing in the journal.
2026-09-19 11:43:11 +08:00
..
2024-09-22 22:55:10 +08:00

Kubernetes Clusters

WIP, not finished yet.

I'm running two Kubernetes clusters, one for production and one for testing.

I prefer to use k3s as the Kubernetes distribution, because it's lightweight, easy to install, and full featured(see what-have-k3s-removed-from-upstream-kubernetes for details).

KubeVirt Cluster

The KubeVirt cluster is running on physical machines, all my virtual machines are running on this cluster, including other Kubernetes clusters.

K3s Clusters

Clusters running as virtual machines on the KubeVirt cluster, for testing and production.

  1. For production:
    1. k3s-prod-1-master-1
    2. k3s-prod-1-master-2
    3. k3s-prod-1-master-3
    4. k3s-prod-1-worker-1
    5. k3s-prod-1-worker-2
    6. k3s-prod-1-worker-3
  2. For testing:
    1. k3s-test-1-master-1
    2. k3s-test-1-master-2
    3. k3s-test-1-master-3

Kubernetes Resources

Kubernetes resources are deployed and managed separately through ryan4yin/k8s-gitops.