I am trying to config Vaults Helm Chart. What I do is:
kubectl exec -it pod -- sh
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-token
is the right answer.