Study. uk . com
  1. Home
  2. All questions
  3. Question 859

CKA study material · question 859 of 1000

Which command lists the EndpointSlices belonging to a Service named web?

  1. kubectl get endpointslices --field-selector service=web
  2. kubectl get endpointslices -l kubernetes.io/service-name=web
  3. kubectl get endpointslices web
  4. kubectl describe service web --show-endpoints
Show the answer

Answer: B. kubectl get endpointslices -l kubernetes.io/service-name=web

EndpointSlices are associated with their Service by the kubernetes.io/service-name label, so a label selector is how they are listed.

Source: Debug Pods (Kubernetes) — Diagnosing the problem › Debugging Services

Challenge yourself on this topic → Study as cards