Create a Kubernetes role

Bind a Kubernetes ServiceAccount to a Vault policy

vault write auth/kubernetes/role/my-role bound_service_account_names=<sa> bound_service_account_namespaces=<ns> policies=<policy> ttl=1h

tool
vault31 commands
tags
vaultconfig

More vault commands

  • vault policy write my-policy policy.hcl

    Upload an HCL policy file to Vault

  • vault policy list

    List all policies in Vault

  • vault secrets enable -path=myapp kv-v2

    Mount a new secrets engine at the given path

  • vault write transit/encrypt/my-key plaintext=$(echo -n 'secret' | base64)

    Encrypt data with the Vault Transit engine

  • vault write transit/decrypt/my-key ciphertext=vault:v1:... | base64 -d

    Decrypt a ciphertext with the Transit engine

all 31 vault commands