Kubernetes Secrets - What is the purpose of type "Opaque" in secret definitions Kubernetes Secrets - What is the purpose of type "Opaque" in secret definitions kubernetes kubernetes

Kubernetes Secrets - What is the purpose of type "Opaque" in secret definitions


type: Opaque means that from kubernetes's point of view the contents of this Secret is unstructured, it can contain arbitrary key-value pairs.

In contrast, there is the Secret storing ServiceAccount credentials, or the ones used as ImagePullSecret. These have a constrained contents.


All types:

SecretType = "Opaque"                                 // Opaque (arbitrary data; default)SecretType = "kubernetes.io/service-account-token"    // Kubernetes auth tokenSecretType = "kubernetes.io/dockercfg"                // Docker registry authSecretType = "kubernetes.io/dockerconfigjson"         // Latest Docker registry auth

To learn more, see Secrets design document.