📄 YAMLeasy
1. An Opaque Secret with stringData
Write a Kubernetes Secret: • apiVersion: v1 • kind: Secret • metadata.name: db-creds • type: Opaque • stringData: username = admin, password = s3cr3t (Use stringData so you can write PLAINTEXT — Kubernetes base64-encodes it for you.)
How to approach this
`stringData` is a write-only convenience: you put plaintext and the API server encodes it into `data` (base64) on apply. `type: Opaque` just means arbitrary key/value secret data. Reading the Secret back later shows base64 under `data` — but `stringData` saves you from encoding by hand.
config.yaml