17 Runbooks - seadogger-tech/seadogger-homelab GitHub Wiki
This page provides step-by-step operational procedures for common tasks.
For a failed or unhealthy pod, first inspect its events, current/previous logs, owning Deployment/StatefulSet, ArgoCD reconciliation and related PVCs. Check node conditions and Ceph health when symptoms involve storage or scheduling. Record the observed cause and the smallest recovery action that addresses it.
Review that concrete action and its data impact with the operator before changing the live cluster. Namespace deletion, application reset, PVC removal and cold-start cleanup are explicit recovery procedures; a bad pod state alone does not authorize them. For Nextcloud migration failures, follow the migration recovery boundaries and preserve the current database, writer barrier and private evidence.
- Stage 1 — Wipe (destructive):
- Set in
ansible/config.yml:cold_start_stage_1_wipe_cluster: trueand optionallyperform_physical_disk_wipe: true. - Run:
ansible-playbook cleanup.yml.
- Stage 2 — Install Infrastructure:
- Set:
cold_start_stage_2_install_infrastructure: true. - Run:
ansible-playbook main.yml.
- Stage 3 — Deploy Applications:
- Set:
cold_start_stage_3_install_applications: trueand enable per-appmanual_install_*flags. - Run:
ansible-playbook main.yml.
Use only after diagnosis and explicit approval of the selected application and PVC/data handling. Review every enabled cleanup switch before invoking the cleanup playbook.
- In
ansible/config.ymlsetrun_pod_cleanup: true. - In
pod_cleanup_list, keep only the target app and choosedelete_pvc: true|false. - Run:
ansible-playbook cleanup.yml. - Redeploy via Stage 3 if desired.
- Create a new Intermediate CA signed by the offline Root CA.
- Update cert-manager
ClusterIssuerto reference the new Intermediate. - Trigger re-issuance of app certificates.
- Distribute (or ensure trust of) the Root CA on client devices.
- Image OS, set static DHCP reservation, ensure SSH.
- Join as worker with k3s token; verify with
kubectl get nodes. - Label/taint as needed and confirm workloads schedule as expected.
- Drain control plane node; upgrade; uncordon.
- Sequentially drain/upgrade worker nodes; uncordon each.
- Verify node readiness and workload recovery.
- Prefer accessing UIs via Ingress + TLS at Traefik VIP.
- Check node-exporter and kube-state-metrics.
- Do not commit real credentials. Use Ansible Vault for secrets and GitHub Actions secrets for CI.
- If secrets were previously committed, rotate immediately and remove from repo history if necessary.
Don't hand-edit /config/.storage/lovelace.dashboard_<name> directly — HA
owns that file and can overwrite an edit made while it's live. Use
deployments/home-assistant/ha_dashboard_edit.py (alongside the HA
deployment manifests it operates on), which calls the same
lovelace/config / lovelace/config/save WebSocket API the frontend
itself uses:
- Create a Long-Lived Access Token: HA profile (bottom-left) → Security → Long-Lived Access Tokens.
- Find the dashboard's real
url_path(not necessarily its title):kubectl exec -n home-assistant home-assistant-0 -c home-assistant -- cat /config/.storage/lovelace_dashboards. - Edit
NEW_CARDSin the script for whatever card(s) you're adding. kubectl cp deployments/home-assistant/ha_dashboard_edit.py home-assistant/home-assistant-0:/tmp/ha_dashboard_edit.py -c home-assistantkubectl exec -n home-assistant home-assistant-0 -c home-assistant -- env HA_TOKEN="<token>" HA_DASHBOARD_URL_PATH="<url_path>" python3 /tmp/ha_dashboard_edit.py- Revoke the token from the same Security screen once done, if it was only needed for this edit.