Dockhand Context Sync + Headlamp¶
This repo now includes two complementary management paths:
Headlampfor native Kubernetes managementDockhandcontext tracking sync from localkubectlcontexts
What Was Added¶
- New app manifest:
manifests/apps/headlamp/headlamp.yml - Homepage integration:
manifests/apps/homepage/homepage.yml - Adds Headlamp card (
https://k8s.smartmur.ca) - Keeps Dockhand card and clarifies Dockhand scope
- New automation script:
scripts/05-sync-dockhand-contexts.sh - Idempotently creates/updates Dockhand environments named
k8s-<context>
Deploy / Apply¶
kubectl apply -f manifests/apps/headlamp/
kubectl apply -f manifests/apps/homepage/
bash scripts/05-sync-dockhand-contexts.sh
Verify¶
kubectl -n apps get deploy headlamp homepage dockhand
kubectl -n apps get svc headlamp homepage dockhand
kubectl -n apps get ingressroute headlamp homepage dockhand
Check from Dockhand DB (in-cluster):
kubectl -n apps exec deploy/dockhand -- \
sqlite3 /app/data/db/dockhand.db \
"select id,name,connection_type,labels from environments where name like 'k8s-%' order by id;"
DNS / Edge Routing Requirements¶
For https://k8s.smartmur.ca to be reachable end-to-end:
- Cloudflare
Arecord:k8s.smartmur.ca -> 192.168.30.117 - Unifi local DNS
Arecord:k8s.smartmur.ca -> 192.168.30.117 - NPM proxy host for
k8s.smartmur.caforwarding to192.168.13.69:19200 - Use wildcard TLS certificate
*.smartmur.ca
Security Notes¶
- Headlamp is currently bound with
cluster-adminvia service account. - Keep Headlamp internal-only unless you front it with SSO (Authentik) and IP restrictions.
scripts/05-sync-dockhand-contexts.shdoes not expose Kubernetes APIs through Dockhand; it registers context-tracking environments in Dockhand usinghawser-edgeprofile defaults.
Re-run Strategy¶
Re-run after kubeconfig context changes:
The script is safe to run repeatedly; existing k8s-* environments are updated in place.