Verify that pod labels match the Service selector.

Section: Services and Endpoints

Show Service selector

bash
bash
kubectl get svc <service> -n <namespace> -o jsonpath='{.spec.selector}{"
"}'

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Services and Endpoints
List services
Check Service types, ports, and cluster IPs.
OpenIn sheetbashsame section
Describe a service
Inspect selectors, target ports, and events.
OpenIn sheetbashsame section
List endpoints
Verify which backends a Service resolves to.
OpenIn sheetbashsame section
List EndpointSlices
Inspect endpoint slice distribution for a Service.
OpenIn sheetbashsame section
Describe an EndpointSlice
Inspect ready addresses and ports at slice level.
OpenIn sheetbashsame section
Find pods selected by a service
Confirm that backend pods actually match the selector.
OpenIn sheetbash2 tag match