Kubernetes imperative

According to the udemy tutorial, I have question .

I just cannot understand this statement " This will automatically use the pod’s labels as selectors"

The command is creating a service type ClusterIP and its name is redis-service, how it know which labels to select?

Create a Service named redis-service of type ClusterIP to expose pod redis on port 6379

kubectl expose pod redis --port=6379 --name redis-service --dry-run=client -o yaml

(This will automatically use the pod’s labels as selectors)

Let me explain and tell me if I’m wrong please.

There is a pod which name is redis in advance, it has a label tier=db then options " pod redis " will automatically use the redis’s lables.