docs: turning the node on restarts the store, so unseal before the re-grant
node.md named the second grant-bootstrap and nothing before it. The first activation with deploy.k8s.enable adds a pod listener to the store's configuration, which restarts container@swarm-bao. A shamir store comes back sealed, the units that read it fail, and grant-bootstrap cannot log in until an operator unseals it. A pkcs11 store unseals itself. node.md now has the order for a swarm that already runs: unseal on a shamir store, then grant-bootstrap once, then restart the policy units, as setup.md does. Only node.md changes. Closes #6844
This commit is contained in:
parent
f9e9101458
commit
4159d01abe
1 changed files with 30 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue