200-901 Application Deployment and Security Practice Question
A developer notices that after a new deployment, the application is not receiving traffic. The Service selector does not match the pod labels. Which kubectl command can be used to inspect the Service's selector?
⚠ Common exam trap
Cisco often tests the distinction between commands that operate on resources (like Services) versus those that operate on pods or containers, leading candidates to mistakenly choose `kubectl exec` or `kubectl logs` for a 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
✓
kubectl describe service my-service
The `kubectl describe service my-service` command displays detailed information about the Service, including its selector field, which defines the label key-value pairs used to match pods. This allows the developer to directly compare the selector against the pod labels to identify the mismatch. It is the most straightforward way to inspect the selector without needing to parse raw YAML or execute commands inside the service.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
kubectl describe service my-service
Why this is correct
kubectl describe provides detailed information including selector.
- ✗
kubectl exec service/my-service -- cat /etc/hosts
Why it's wrong here
Cannot exec into a service; only pods.
- ✗
kubectl get service my-service -o yaml
Why it's wrong here
This shows the YAML definition, but describe is more concise for quick inspection.
- ✗
kubectl logs service/my-service
Why it's wrong here
Logs are for pods, not services.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 200-901 question from scratch — 989 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 200-901 practice question is part of Courseiva's free Cisco 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 200-901 exam.