Drag or tap steps into the slots.
CKAD Application Deployment Practice Question
Order the steps to expose a Kubernetes Deployment as a ClusterIP Service.
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
Step 1: Ensure Deployment exists and is running. Step 2: Create a ClusterIP Service YAML manifest. Step 3: Apply the Service manifest using kubectl apply. Step 4: Verify the Service endpoints are populated. Step 5: Test DNS resolution of the Service name from a pod.
A Service requires a running Deployment. Define and apply the Service, then verify endpoints and test DNS resolution.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Step 1: Ensure Deployment exists and is running. Step 2: Create a ClusterIP Service YAML manifest. Step 3: Apply the Service manifest using kubectl apply. Step 4: Verify the Service endpoints are populated. Step 5: Test DNS resolution of the Service name from a pod.
Why this is correct
This is the correct order because the Service requires a running Deployment to target. After creating and applying the Service, endpoints must be verified before DNS resolution works. DNS testing confirms the Service is reachable.
- ✗
Step 1: Create a ClusterIP Service YAML manifest. Step 2: Apply the Service manifest. Step 3: Ensure Deployment exists and is running. Step 4: Test DNS resolution. Step 5: Verify endpoints.
Why it's wrong here
This ordering applies the Service before confirming the Deployment's Pods exist, so the Service's selector will match nothing and the Endpoints object will be empty. Testing DNS resolution after applying the Service but before verifying endpoints can yield a successful lookup for the ClusterIP, yet the Service will not route traffic to any backing Pod. The correct workflow requires a running Deployment first, then Service creation, then endpoint verification before DNS-based connectivity tests.
- ✗
Step 1: Ensure Deployment exists and is running. Step 2: Test DNS resolution. Step 3: Create the Service YAML. Step 4: Apply the Service. Step 5: Verify endpoints.
Why it's wrong here
Testing DNS resolution after ensuring the Deployment is running but before any Service exists is invalid, because CoreDNS has no record for a Service name that has not been created. The Service YAML must be created and applied before the name resolves, and endpoint verification must come after application to confirm the selector actually matched the Deployment's Pods. This sequence also skips the apply step before DNS, so the lookup would fail with NXDOMAIN rather than validating connectivity.
- ✗
Step 1: Apply the Service manifest. Step 2: Create the Service YAML. Step 3: Ensure Deployment exists. Step 4: Verify endpoints. Step 5: Test DNS.
Why it's wrong here
Applying a Service manifest before creating the YAML file is impossible, as kubectl apply requires an existing manifest path or stdin input. This order also ensures the Deployment after the Service has already been applied, so the Service may temporarily select nothing if the Deployment's Pods were not already labeled correctly. Additionally, the correct sequence must create the Deployment and Service before any verification, but this ordering effectively starts with a nonexistent manifest and ends with premature endpoint and DNS checks.
Visual reference
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 →
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.