NetBird keys and route
Goal: Bifrost and the cluster peer join the mesh, and Bifrost reaches 192.168.1.0/24 through it. About 5 minutes.
Procedure
Section titled “Procedure”-
In the NetBird UI, logged in through GitHub, create two reusable keys under Setup Keys → Add Key, and one token under Settings → Access Tokens → Create Personal Access Token.
Item Stored as Setup key bifrost-agentNB_BIFROST_SETUP_KEYin SOPSSetup key k8s-routing-peerNETBIRD_SETUP_KEYin OpenBaosecret/netbirdPersonal access token NB_PROXY_TOKENin SOPS -
Add
NB_BIFROST_SETUP_KEY(replacing the placeholder) andNB_PROXY_TOKENto SOPS, then redeploy. The bootstrap now startsnetbird-agentandnetbird-proxy.Terminal window just sops-view secrets/bootstrap.sops.yamljust core hetzner up -
Write the cluster key to OpenBao. Token and key travel on stdin, so neither shows in a process list.
Terminal window export ROOT_TOKEN=$(just openbao-token)printf '%s\n%s' "$ROOT_TOKEN" '<k8s-routing-peer key>' | kubectl exec -i -n openbao openbao-0 -c openbao -- \sh -c 'read -r BAO_TOKEN; export BAO_TOKEN; exec bao kv patch -mount=secret netbird NETBIRD_SETUP_KEY=-'just openbao-revoke -
Restart the peer so it mounts the new key.
Terminal window kubectl delete pod -n netbird netbird-peer-0 -
In the NetBird UI, add Network → Routes → Add Route: network
192.168.1.0/24, routing peerk8s-routing-peer, enabled.
kubectl get pods -n netbirdnetbird-peer-0 is Running. In the NetBird UI, Peers shows bifrost-agent and k8s-routing-peer connected, and Routes shows 192.168.1.0/24 active.
Details: NetBird, Traffic flow.