CKAD Services and Networking Practice Question
An Ingress resource specifies TLS termination using a secret. The secret must contain which keys?
⚠ Common exam trap
Many candidates confuse common file extensions (`.pem`, `.crt`, `.key`) with the exact key names required by Kubernetes (`tls.crt`, `tls.key`), leading them to pick option B or C instead of D.
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
Kubernetes Ingress resources require TLS termination secrets to contain exactly two keys: `tls.crt` (the TLS certificate) and `tls.key` (the private key). The Ingress controller reads these specific key names from the Secret's `data` or `stringData` field to configure HTTPS termination, as defined by the Kubernetes API specification.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
username and password
Why it's wrong here
In Kubernetes Ingress TLS, secrets are expected to hold X.509 material, not user credentials. The data keys `username` and `password` are used for HTTP basic authentication, typically configured via the `nginx.ingress.kubernetes.io/auth-type: basic` annotation, and are entirely unrelated to TLS termination. When an Ingress references a secret for TLS, the controller ignores these keys, so the connection cannot be encrypted — the wrong secret type and data schema are being used.
- ✗
cert.pem and key.pem
Why it's wrong here
While `cert.pem` and `key.pem` appear to be a certificate/private-key pair, the Ingress API does not recognize them as the standard keys. A Kubernetes secret of type `kubernetes.io/tls` must use exactly `tls.crt` and `tls.key` for the certificate and key, respectively; the ingress controller looks for these exact key names when loading the secret. Using non-standard names causes the controller to fail or to treat the secret as not providing TLS material, even if the file contents are valid.
- ✗
ca.crt and tls.crt
Why it's wrong here
The key `tls.crt` is indeed the required server certificate for TLS termination, but it cannot stand alone without the corresponding private key. The `ca.crt` key is optional; it carries a CA bundle (e.g., for client certificate verification) and is not the private key needed to establish the TLS handshake. An ingress controller needs both the certificate and the private key to decrypt incoming traffic, so omitting `tls.key` leaves the TLS configuration incomplete and the secret invalid for this purpose.
- ✓
tls.crt and tls.key
Why this is correct
This is the correct answer because a Kubernetes secret of type `kubernetes.io/tls` conventionally uses exactly these two data keys: `tls.crt` holds the PEM-encoded server certificate (and optionally an intermediate chain), and `tls.key` holds the PEM-encoded private key. When an Ingress resource specifies a TLS block with `secretName`, the controller loads these keys to terminate HTTPS for the configured host. The presence of both correctly named keys, along with a matched certificate/key pair, enables a valid TLS termination setup.
Go deeper
Related to this question
About these practice questions
This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.