created a deployment(labels: a=b) and service for deployment. the pod inside the deployment has labels: c=d. so my doubt is should the selector in service be the label of pod c=d or label of deployment a=b?
This is the correct approach.
because the service endpoints are pods IP address?
Yeah,
Please read this doc -