CKAD Practice Question: Application Environment, Configuration and Security
Which THREE of the following are valid types of Secrets in Kubernetes?
⚠ Common exam trap
CNCF often tests the exact naming of built-in Secret types, and the trap here is that candidates may confuse `dockerconfigjson` (missing the `kubernetes.io/` prefix) with the valid `kubernetes.io/dockerconfigjson`, or assume `configmap` is a Secret type when it is a separate resource.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Opaque
Options A, B, and E are valid Kubernetes Secret types. Opaque is the default type for arbitrary data. kubernetes.io/ssh-auth is used for SSH authentication credentials. kubernetes.io/tls is used for TLS certificates. Options C and D are invalid: configmap is a separate resource, and dockerconfigjson lacks the kubernetes.io/ prefix (the valid type is kubernetes.io/dockerconfigjson).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Opaque
Why this is correct
Opaque is the default Kubernetes Secret type when no `type` field is specified, designed for arbitrary key-value pairs such as passwords, API tokens, or configuration fragments. Its data is base64-encoded but not encrypted at rest by default, and no additional validation or controller behavior is attached to it. This makes it the general-purpose fallback for most application secrets, and it is the most commonly used type in practice.
- ✓
kubernetes.io/ssh-auth
Why this is correct
The `kubernetes.io/ssh-auth` type is a valid built-in Secret type for SSH credentials, specifically a PEM-encoded private key stored under the `ssh-privatekey` data key. Unlike TLS secrets, this type does not require a public key or certificate, and it is used to authenticate to Git servers or SSH-enabled services from within a pod. The kubelet or controller may use this secret to mount the key into the container at a specified path.
- ✗
configmap
Why it's wrong here
ConfigMap is a distinct Kubernetes resource with its own `kind`, meant for non-confidential configuration data, not a valid Secret type. While both ConfigMaps and Secrets store key-value pairs, Secrets are intended for sensitive data and have the `secrets` stringData/base64 encoding semantics. Specifying 'configmap' as a Secret `type` yields an error, because the only valid types are the built-in Secret types or custom types prefixed with `example.com/`.
- ✗
dockerconfigjson
Why it's wrong here
The valid type for storing Docker registry credentials is `kubernetes.io/dockerconfigjson`, not the bare string `dockerconfigjson`. Kubernetes identifies built-in secret types by their full canonical name, which includes the `kubernetes.io/` prefix; omitting it causes the `type` to be treated as an opaque or custom type, so the automatic behavior of using it for image pulls (e.g., from `imagePullSecrets`) would not apply. The data for this type must contain a `.dockerconfigjson` key holding the base64-encoded Docker config file.
- ✓
kubernetes.io/tls
Why this is correct
The `kubernetes.io/tls` type is a valid built-in Secret type for storing a TLS certificate and its private key. Its data must include exactly the keys `tls.crt` and `tls.key`, and tools like `kubectl create secret tls` populate these automatically. This type is commonly referenced by Ingress resources to terminate HTTPS, and it is recognized by ingress controllers to load the certificate and key.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CKAD question from scratch — 826 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.