diff --git a/docs/4-implementation/k8s/node.md b/docs/4-implementation/k8s/node.md index d7a1a9e35..54d4372c4 100644 --- a/docs/4-implementation/k8s/node.md +++ b/docs/4-implementation/k8s/node.md @@ -132,6 +132,36 @@ The bootstrap policy that `swarmctl bao grant-bootstrap` applies carries `sys/auth/jwt-k8s`, so a store set up before the node existed needs that step once more. +### Turning the node on for a swarm that already runs + +The first activation with `deploy.k8s.enable` restarts the store's container, +`container@swarm-bao`. The node adds a `pod` listener to the store's +configuration, and a changed container configuration restarts the container. +What comes next depends on the store's seal: + +- With the default `pkcs11` seal the store unseals itself. Skip the unseal + below. +- With `deploy.bao.seal = "shamir"` the store comes back sealed. Every unit that + reads it fails until an operator unseals it, and `swarmctl bao grant-bootstrap` + can't log in either. Unseal first, with the saved keys, as + [setup](../../1-getting-started/setup.md) does: + + ```bash + bao operator unseal # repeat with different keys until the store reports unsealed + ``` + +Then, on either seal, as root on the host that runs `swarm-bao`: + +```bash +swarmctl bao grant-bootstrap # prompts for the root token, input hidden +systemctl reset-failed 'swarm-bao-*-policy.service' swarm-bao-agent-pki.service +systemctl restart 'swarm-bao-*-policy.service' swarm-bao-agent-pki.service +``` + +The grant adds `sys/auth/jwt-k8s` to the bootstrap policy, and the restart lets +`swarm-bao-granter-role` enable the mount and `swarm-bao-k8s-jwt-policy` write +the pods' login. Until both have run, the pods can't log in. + ## Validation `module-eval-k8s` compares an all-local host with the option on against the