CKAD Practice Question: Application Environment, Configuration and Security
You have a Secret of type 'kubernetes.io/tls' named 'tls-secret'. What keys are required in the Secret data?
⚠ Common exam trap
Many candidates assume 'ca.crt' is required because they think of full certificate chains, but the CKAD exam tests the exact mandatory keys per the Kubernetes API documentation for 'kubernetes.io/tls'.
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
✓
tls.crt and tls.key
A is correct because a Kubernetes TLS secret of type 'kubernetes.io/tls' requires exactly two data keys: 'tls.crt' (the TLS certificate) and 'tls.key' (the private key). These are mandatory for the TLS handshake to function, as defined by the Kubernetes API for TLS secrets.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
tls.crt and tls.key
Why this is correct
In a kubernetes.io/tls Secret, the data field must contain exactly tls.crt (the PEM-encoded certificate chain) and tls.key (the PEM-encoded private key). These two keys are mandatory: the API server validates their presence at creation time, and Ingress controllers or application pods rely on them for TLS termination. Without either key, the Secret cannot be used for its intended cryptographic purpose.
- ✗
username and password
Why it's wrong here
The keys username and password are the conventional data keys for a Secret of type kubernetes.io/basic-auth, which supplies HTTP basic authentication credentials. A TLS Secret is not a credential store for user authentication; its data consists purely of certificate material. If you try to create a kubernetes.io/tls Secret with username and password instead of tls.crt and tls.key, the API server will reject it because the required tls.* keys are absent.
- ✗
tls.crt, tls.key, and ca.crt
Why it's wrong here
While many users include ca.crt to provide a custom CA certificate for verification, this key is not required by the Kubernetes API for a kubernetes.io/tls Secret. The mandatory keys are only tls.crt and tls.key; ca.crt is an optional addition that some Ingress controllers or applications use separately. Omitting ca.crt does not make the Secret invalid, and the API server will accept it without complaint, whereas missing tls.crt or tls.key would cause rejection.
- ✗
.dockerconfigjson
Why it's wrong here
The key .dockerconfigjson is the sole mandatory data key for a kubernetes.io/dockerconfigjson Secret, which stores a base64-encoded Docker config.json for authenticating to container image registries. This type is unrelated to TLS certificates; a kubernetes.io/tls Secret never expects or uses this key. If you set .dockerconfigjson as the only key on a TLS Secret, the API server will fail validation because the required tls.crt and tls.key are missing.
Go deeper
Related to this question
About these practice questions
One of 826 original CKAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.