Enable Kubernetes auth method

Allow pods to authenticate with Vault via ServiceAccount JWT

vault auth enable kubernetes && vault write auth/kubernetes/config kubernetes_host=https://kubernetes.default.svc

tool
vault31 commands
tags
vaultsecuritykubectl

More vault commands

  • vault read database/creds/readonly-role

    Obtain short-lived Postgres credentials from the database secrets engine

  • vault operator seal vault operator unseal $UNSEAL_KEY

    Manually seal or unseal Vault with an unseal key shard

  • vault kv patch -mount=secret app api_key=<id>

    Update one field without rewriting the whole secret; note: kv patch needs KV-v2

  • T=$(vault kv get -wrap-ttl=60s -field=wrapping_token -mount=secret app); vault unwrap $T

    Pass a secret as a single-use wrapping token; note: any reuse trips a security alarm

  • vault token capabilities database/creds/readonly

    Show effective ACL verbs the current token has on a path; fast policy debugging

all 31 vault commands