Initialise OpenBao
Goal: OpenBao unsealed and auto-unsealing, with a policy, a role and seeded secrets for every app. About 10 minutes.
Procedure
Section titled “Procedure”-
Wait for the OpenBao pod to run. It stays sealed.
Terminal window kubectl get pods -n openbao -w -
Initialise and unseal. The recipe revokes the init root token at once and writes only the unseal key, to
~/openbao-unseal-key(mode 600).Terminal window just openbao-init -
Set
OPENBAO_UNSEAL_KEYin SOPS to the contents of that file.Terminal window just sops-view secrets/bootstrap.sops.yaml -
Push the real key into the cluster and restart the pod. The StatefulSet uses
OnDelete, so a rollout does nothing; the unseal sidecar reads the new Secret on start.Terminal window just create-secretskubectl delete pod -n openbao openbao-0rm ~/openbao-unseal-key -
Enable Kubernetes auth and KV v2, write a read-only policy and role per app, and seed every missing key.
Terminal window just openbao-setup
openbao-setup is idempotent: it rewrites auth, policies and roles, but never overwrites a key that exists. Grafana’s OAUTH_CLIENT_SECRET comes from GRAFANA_OAUTH_CLIENT_SECRET in SOPS; everything else is random. NETBIRD_SETUP_KEY starts as a placeholder so the CSI mount succeeds, and gets its real value in Phase 6.
kubectl exec -n openbao openbao-0 -c openbao -- bao status | grep Sealedjust openbao-sa-get grafana grafana grafana secret/grafana ADMIN_PASSWORD >/dev/null && echo policy-okkubectl get applications -n argocdSealed false, then policy-ok. Apps turn Healthy as their CSI volumes mount.