DELAPARRA
Index
Color
NL
Category: Kubernetes

Secret

Explained by Updated

What is Secret?

Secret: Like a ConfigMap but for sensitive data — passwords, tokens, TLS keys. Stored base64-encoded and handled with extra care by the API. A Secret in Kubernetes stores sensitive data such as passwords, API keys and TLS certificates. Pods use it as environment variables or as files, just like a ConfigMap.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Secret

How is Secret used in practice?

By default, Secrets are only base64-encoded, which is not encryption. Anyone who can read Secrets in a namespace can read the values. Their protection comes from access rules, and from encryption at rest, which most managed clusters enable.

What should you keep in mind with Secret?

Restrict who can read Secrets with RBAC, and never commit them to Git in plain form. Tools like Sealed Secrets, SOPS or the External Secrets Operator let you store encrypted versions in Git or pull values from a secret manager. Rotate secrets when people leave or after an incident, and restart pods afterwards, because environment variables are only read at start-up.

What does an example of Secret look like?

apiVersion: v1 kind: Secret metadata: name: db-creds type: Opaque stringData: password: s3cr3t

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with S

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.