CLI best practices
Confirmable deploy flow
Заголовок раздела «Confirmable deploy flow»- Build or edit config.
hubctl validate --config configs/hub.yamlhubctl validate --config configs/hub.yamlhubctl deploy --config configs/hub.yaml --state-dir /var/lib/vpn-hubhubctl status --state-dir /var/lib/vpn-hub
Use --confirm-within for all production deploys.
Private networks and DNS
Заголовок раздела «Private networks and DNS»Keep private ranges explicit and add DNS zones in one document pass. For mixed environments:
- one private namespace per egress
- one DNS policy per namespace
- one tunnel health check per namespace
Recovery
Заголовок раздела «Recovery»- Prefer
hubctl device set-egressover deleting a working tunnel. - Keep last known good files in archive before major upgrades.
- If a publishable host fails, capture
hubctl statusand restart agent only via controlled flow.
Read-only checks
Заголовок раздела «Read-only checks»Run with a user who has only shell-level access before touching SSH credentials:
hubctl status --state-dir /var/lib/vpn-hubhubctl routeshubctl status
Every read checks path before write operations.