The stringData field lets a Kubernetes Secret accept plain-text key-value pairs. Kubernetes converts those entries into the Secret's data field as Base64-encoded values when storing the object. section 8.3.1
Define credentials without manual encoding
apiVersion: v1 kind: Secret stringData: user: my-username pass: my-password After applying this manifest, retrieving the Secret with kubectl get -o yaml no longer shows stringData. The entries appear under data as Base64-encoded strings. The field is therefore write-only: use it to set values, not to read them back. section 8.3.2
