Kubernetes Secret

A Kubernetes object for small sensitive values such as passwords and tokens, which pods can use as files or environment variables.

In more detail

Access to Secrets is controlled with RBAC, and a pod can only use Secrets from its own namespace. Secret data is only Base64-encoded, so without encryption at rest anyone who can read etcd or its backups reads the values.

Example

kubectl get secret web-secret -o jsonpath='{.type}'

Related terms

Taught in

References