I am trying to config Vaults Helm Chart. What I do is:
- Deploy with my CI/CD tool and wait for the replicas to be available
- Enter the UI and init Vault
- Restore manually with my backup file
- ssh into the pod with
kubectl exec -it pod -- sh - vault login
vault write auth/kubernetes/config token_reviewer_jwt="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" kubernetes_host="https://$KUBERNETES_PORT_443_TCP_ADDR:443" kubernetes_ca_cert=@/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
Step 6 is what causes all my problems. I can't logout which sounds like an extreme security risk. Isn't there a way to automate this? I've read the docs, there seems to be an agent, but it's very confusing.
rm ~/.vault-tokenis the right answer.