Bird
0
0

What output should you expect when running

medium📝 Command Output Q5 of 15
Kubernetes - Services
What output should you expect when running
kubectl get endpointslices -n test
if the 'test' namespace has no EndpointSlices?
ANo resources found in test namespace.
BError: namespace 'test' does not exist.
CNAME ENDPOINTS AGE (empty list)
DList of EndpointSlices with zero endpoints.
Step-by-Step Solution
Solution:
  1. Step 1: Understand kubectl get behavior

    If no resources of the requested type exist in the namespace, kubectl returns 'No resources found in namespace.'
  2. Step 2: Check for errors

    If the namespace exists, no error is shown; an empty list or message is shown instead.
  3. Final Answer:

    No resources found in test namespace. -> Option A
  4. Quick Check:

    Empty resource lists show 'No resources found' message [OK]
Quick Trick: No EndpointSlices means 'No resources found' message [OK]
Common Mistakes:
  • Expecting an error if namespace exists
  • Assuming an empty table is shown
  • Confusing endpoints with EndpointSlices output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes