Secrets look like ConfigMaps but hold sensitive values: passwords, tokens, keys and certificates. Containers use them the same ways, with secretKeyRef, envFrom or a secret volume, and access to them can be limited separately with RBAC.
Values under data are base64 encoded. That is an encoding, not encryption: anyone who can read the Secret can decode it with base64 -d. In a manifest, put plain text under stringData and let the API encode it. If you encode by hand, use printf %s or echo -n; a plain echo adds a newline that becomes part of the password.
Some Secrets have a type that tools understand. kubernetes.io/dockerconfigjson, made with kubectl create secret docker-registry, holds registry credentials, and Pods list it in imagePullSecrets to pull from a private repository. kubernetes.io/tls holds a certificate and its key.
Create, decode, and a registry credential.