Create a token with a policy
Issue a short-lived token limited to one policy
vault token create -policy=read-only -ttl=1h
More vault commands
-
vault auth listShow all enabled auth methods in Vault
-
vault auth enable kubernetes && vault write auth/kubernetes/config kubernetes_host=https://$KUBERNETES_PORT_443_TCP_ADDR:443Enable and configure the Kubernetes auth method
-
vault write auth/kubernetes/role/my-role bound_service_account_names=<sa> bound_service_account_namespaces=<ns> policies=<policy> ttl=1hBind a Kubernetes ServiceAccount to a Vault policy
-
vault policy write my-policy policy.hclUpload an HCL policy file to Vault
-
vault policy listList all policies in Vault