Bird
0
0

Which kubectl command correctly lists EndpointSlices in the default namespace?

easy📝 Syntax Q12 of 15
Kubernetes - Services
Which kubectl command correctly lists EndpointSlices in the default namespace?
Akubectl describe endpointslices
Bkubectl get endpointslices -n default
Ckubectl get endpointslices
Dkubectl get endpoints -n default
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct resource name for EndpointSlices

    The resource name is 'endpointslices' (all lowercase, plural).
  2. Step 2: Use kubectl get with namespace option

    To list EndpointSlices in the default namespace, use 'kubectl get endpointslices -n default'.
  3. Final Answer:

    kubectl get endpointslices -n default -> Option B
  4. Quick Check:

    Correct resource and namespace flag = kubectl get endpointslices -n default [OK]
Quick Trick: Use 'kubectl get endpointslices -n default' to list EndpointSlices [OK]
Common Mistakes:
  • Omitting the namespace flag when needed
  • Using 'endpoints' instead of 'endpointslices'
  • Using describe instead of get for listing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes