Skip to content

Operations

This page covers day-2 work: keeping the install healthy, backing it up, upgrading it, and removing it deliberately.

The first command when something looks wrong

Section titled “The first command when something looks wrong”
Terminal window
sudo ./install.sh --doctor

The doctor checks the node, the API, the identity and console workloads, routes, pending Helm releases, storage, and the latest backup. Add --insecure when the certificate is self-signed (a lab, or ACME staging).

There are two backup paths, and they cover different halves. Use both.

Path Command Covers
Host sudo ./install.sh --backup etcd snapshot (or a datastore tarball on a sqlite-backed k3s), the host seed in /etc/umkim-thin, and the console’s /data PVC
Console Backups → Back up now, or umkim-thin backup create One archive of console state + seed + app inventory, plus a volume snapshot per application PVC where the CSI driver supports it
Terminal window
sudo ./install.sh --backup
sudo ./install.sh --backup --out /var/backups/umkim-thin
# the console's half, from inside the pod
kubectl -n umkim-thin exec deploy/umkim-thin-console -- umkim-thin backup create
kubectl -n umkim-thin exec deploy/umkim-thin-console -- umkim-thin backup list
kubectl -n umkim-thin exec deploy/umkim-thin-console -- umkim-thin backup verify <name>

The console’s archive contains the console PVC (invites, app state, WireGuard peers, per-app Helm values), the installer seed, the app inventory, and the catalog pins. The snapshot is the data. A metadata-only backup cannot rebuild an app’s data, and a data snapshot without the state cannot rebuild the console.

The schedule runs inside the console process — one archive per UMKIM_THIN_BACKUP_INTERVAL (default 24h), then a prune to UMKIM_THIN_BACKUP_KEEP (default 7). There is no cron expression; a daily archive is the supported granularity.

Topology App data
HA (Longhorn) Real VolumeSnapshots. The HA installer provides the snapshot API and a longhorn-snapshot VolumeSnapshotClass
Single node (local-path) No snapshots. local-path is not a CSI driver, so the archive is metadata-only and the console says so
External NFS Skipped with a warning naming the PVCs — back those up on the NFS server

On a single node, take a VM snapshot as the data half. It is the simplest reliable method for one server and the one the quickstart recommends.

The archives live on the console PVC. Copy them off the host (scp, an NFS mount, or a backup agent) or the backup dies with the disk it protects. On HA with Longhorn the PVC is replicated; that is redundancy, not a backup.

Two steps, in this order:

  1. Data. Create a PVC from the archive’s snapshot and let the app’s workload mount it. The console prints the snapshot names; it does not apply them, because replacing a live PVC is destructive. On Longhorn that is a VolumeSnapshot → PersistentVolumeClaim restore; on a single node, restore the VM or the volume from your infrastructure backup.

  2. State. Restore the archive:

    Terminal window
    umkim-thin backup restore umkim-thin-20261102T030000Z.tar.gz --apps

    --apps reinstalls the catalog apps from the archive that are missing, at the chart version they had. The restore writes a safety archive of the current state first, so a wrong archive can be undone by restoring that one. In the console: Backups → Restore.

Restart the console pod after a restore that changes secrets (kubectl -n umkim-thin rollout restart deploy/umkim-thin-console).

The full host-level restore — including the etcd half — is docs/restore-drill.md. A backup you have never restored is a hypothesis; the drill is documented but has not yet been exercised end to end in the lab.

  • Weekly: sudo ./install.sh --backup plus a console backup, to a directory that is copied off the host.
  • Before every upgrade: a backup and a VM snapshot.
  • Monthly: restore one app’s data into a scratch namespace and open it.
  • Keep at least one copy offline; a compromised host must not be able to delete its own backups.

The Storage tab has two paths, and both are plan-first.

The installer runs a root systemd unit, umkim-thin-storage, that listens on a host-only Unix socket and exposes a fixed operation set: list disks, plan, apply, remove. The console drives it; the cluster never sees a privileged pod.

  • Blank disks / RAID — import a disk (or a mirror) and export it over NFS as a ReadWriteMany StorageClass. The plan is rendered before anything is touched, and applying a format requires typing FORMAT.
  • Existing directory — export a directory you already have, without formatting anything.
Terminal window
umkim-thin storage disks
umkim-thin storage plan --name media --kind disk --disk /dev/vdb --raid 1
umkim-thin storage apply --name media --kind disk --disk /dev/vdb --raid 1 --confirm FORMAT
umkim-thin storage list
umkim-thin storage remove --name media

--raid takes none, 0, 1 or 5. apply refuses to format a disk without --confirm FORMAT, and the agent is the only thing that writes to a block device.

Point at an NFS server you already run. The console probes TCP/2049, verifies the export with showmount -e, installs nfs-subdir-external-provisioner as Helm release nfs-<name>, and creates a ReadWriteMany, Retain StorageClass. It does not format, mount or manage the remote export.

Terminal window
umkim-thin storage plan --name nas-media --kind external \
--server 192.168.1.20 --export /volume1/media
umkim-thin storage apply --name nas-media --kind external \
--server 192.168.1.20 --export /volume1/media
umkim-thin storage verify --server 192.168.1.20 --export /volume1/media

This is the recommended way to keep media on a NAS on either topology, and the only way to get a shared media class on HA without Longhorn. The server-side setup (exports, firewall, client CIDRs) is in docs/quickstart/12-external-nfs.md.

Terminal window
cd umkim-thin
git pull
sudo ./install.sh --zone example.com --email you@example.com --reuse-k3s

Use the same flags as the first install. The installer keeps /etc/umkim-thin/secrets.yml and every existing secret, copies /data/identity-apps.yml off the console PVC before upgrading identity, re-renders values, re-packages charts, runs helm upgrade --install for the identity stack and console, and waits for rollout.

With an already-available image, pass the tag instead of building:

Terminal window
sudo ./install.sh --zone example.com --email you@example.com \
--image ghcr.io/rborso/umkim-thin:v0.2.0

Apps upgrade independently of the platform. See Versions and upgrades: list versions, pick one explicitly, and let helm upgrade --atomic roll back on failure. Database migrations are the risk; the backup is the real rollback.

Re-apply the NetworkPolicies so the new namespaces get default-deny ingress:

Terminal window
PROVISION_ENV=deploy/provision-single.env ./deploy/provision.sh --tags netpol

The role only sees namespaces that exist when it runs.

WireGuard gives clients a private path to cluster services and DNS. It does not automatically make catalog apps private — that is the per-route vpn exposure or the trusted.vpn path.

  1. Allow and forward 51820/udp to the node (or the HA VIP). On a cloud host, open it in the provider firewall too.
  2. Install the gateway: Catalog → WireGuard gateway → Install, or umkim-thin app install wireguard.
  3. Access → WireGuard clients → Create client, name it (for example laptop), then scan the QR code or download the .conf.
  4. Import the config into the WireGuard app and activate it.

The client gets an address in 192.168.168.0/24 (the gateway is .1), with cluster pod/service CIDRs as allowed IPs and the VPN DNS service as its resolver. Revoke by deleting the client; the gateway reloads the peer list and the old key stops working.

Caveats:

  • One replica. A WireGuard interface is stateful. On a multi-node cluster, pin the gateway to the node the UDP port reaches (nodeSelector).
  • VPN routes need split DNS. A vpn route is published only on the internal entrypoint; use the VPN hostname (or split DNS) or you will not resolve it. A client created before the VPN DNS service existed must be re-downloaded to get the same-URL behaviour.
  • The VPN DNS pod installs dnsmasq at startup, so it needs egress to a package mirror. An air-gapped install needs an image with dnsmasq baked in (vpnDNSImage).
  • The gateway is privileged-ish: it needs NET_ADMIN and hostNetwork. Treat it like any other privileged workload.
Piece Single node HA
Control plane one k3s server three servers, embedded etcd, kube-vip VIP
Storage local-path + host NFS export Longhorn longhorn-rwo + longhorn-rwx
Console host mode, state in /etc/umkim-thin cluster mode, state on a PVC
Firewall host firewall enabled firewalld off; Calico enforces
WireGuard on the node pin to the node behind the UDP forward
Backups metadata archive + VM snapshot metadata archive + Longhorn volume snapshots

Point *.<zone> at the VIP (or a load balancer in front of it). If a Longhorn PVC stays Pending, check kubectl -n longhorn-system get nodes.longhorn.io and the volume conditions — Longhorn needs disk on every node and the media volume needs room for its replicas.

What HA actually buys you. Every catalog app runs a single replica; this is not a load-balanced cluster. HA means:

  • the API and ingress survive a node loss (three control planes, VIP);
  • a stateful app is rescheduled onto a surviving node, and Longhorn reattaches its volume there;
  • the console’s own state is on a replicated PVC.

It is failover, not replication. Two apps — Gitea and Nextcloud — could be scaled upstream, but their databases are single-replica in these charts, so app-tier replicas would move the failure, not remove it. The honest statement is the one in the catalog: HA means volume reattachment for a household, and Postgres is the remaining single point of failure.

Symptom Check
Login loop clock skew: chronyc makestep on the nodes; compare date -u with the client
Browser certificate warning import /etc/umkim-thin/tls/ca.crt; staging certificates are untrusted by design
404 or 502 on an app host kubectl -n <app> get ingress,svc,endpoints; the host must match the catalog route
App install cannot find the chart the entry is not vendored; re-run the provisioner or use the local chart mirror
PVC Pending storage class and access mode: kubectl describe pvc; on HA check Longhorn disks and replicas
Pods Pending on HA Calico/firewalld; firewalld must be off and the pod CIDR must not overlap the node network
Storage apply refuses to run read the plan; a format needs the FORMAT confirmation
External NFS apply hangs TCP/2049 from the console pod, and showmount -e <server> from a node; apply can take five minutes
Console 401/403 Authelia session vs console login; try localadmin; check /etc/umkim-thin/console-session-key exists
WireGuard handshake fails UDP 51820 forwarding, WG_ENDPOINT, and exactly one gateway replica
Certificate issuance never happens a matching default certificate is present (lab CA); disable it and ensure port 80 reaches Traefik
HA VIP unreachable kube-vip pod/lease, the VIP is outside the DHCP pool, and the router forwards to it
SSH host-key warning after a reset expected after a snapshot restore: ssh-keygen -R <address>

Logs:

Terminal window
kubectl -n umkim-thin logs deploy/umkim-thin-console
kubectl -n identity logs deploy/authelia
kubectl -n identity logs deploy/lldap
kubectl -n kube-system logs deploy/traefik
kubectl get events -A --sort-by=.lastTimestamp | tail -30
  • The console is cluster-admin-adjacent: Helm installs arbitrary charts. The threat model and remaining hardening work are in docs/security-plan.md. Read it before exposing the console to the internet.
  • The builder is the only privileged workload: its own namespace, no ServiceAccount token, no host namespaces, a digest-pinned image, and the node’s containerd socket as the only host access.
  • The single-node storage agent is a root host service on a host-only Unix socket. It is the only component that formats disks, and it must not be exposed beyond the host/console.
  • Secrets are write-only through the API and passed to the cluster on stdin. Audit lines carry the actor and action, never values.
  • The admin is expected to bring DNS, ports, backups, and upgrade discipline. Everything above that floor — identity, routes, auth, invites, app installs, storage, backup tooling — is the product’s job.

A short first-week checklist: change the generated admin password in your password manager, register a second TOTP device, confirm the portal and console (not just the apps) are behind authentication, confirm a backup restores, and review docs/quickstart/10-security.md.

Back up first. Helm uninstall can delete PVCs, and k3s-uninstall.sh may remove the local storage under /var/lib/rancher/k3s/storage. If the data matters, copy it or snapshot the VM.

Terminal window
sudo ./install.sh --uninstall

It asks you to type uninstall, then removes the umkim-thin and identity releases and runs k3s-uninstall.sh. By default it keeps /etc/umkim-thin and /var/lib/umkim-thin.

Terminal window
sudo ./install.sh --uninstall --purge-data

--purge-data removes the state directories. App PVCs are still at risk because k3s may remove the local storage that backs them. --uninstall runs the same teardown as teardown.sh, which also unmounts the NFS exports the storage agent created.

Afterwards: delete the auth, console, home and wildcard DNS records, close ports 80/443 and 51820/udp, and rotate any credentials stored on the host. A k3s uninstall does not shred data — wipe the disk before handing the host to someone else.

To remove one app rather than the platform, use the console’s Installed apps → Uninstall and read the purge prompt, or umkim-thin app uninstall <name>.