Why both port and targetPort are exposed by Service?

Ran across something that I did not expect. I have a service with port 80 and targetPort 8080. I can curl against both service:80 and service:8080. Both work. That was new to me. I expected that only service:80 would work. I looked through the iptables nat rules and see the rules regarding my service for 80 → 8080 but not 8080 → 8080. Is this expected behavior?

Cluster information:

Kubernetes version: 1.24
Cloud being used: bare-metal
Installation method: Rancher
Host OS: Ubuntu
CNI and version: Canal
CRI and version: Docker

No that really isn’t normal. Can you kubectl get svc (servicename) -o yaml

Glad to hear that this is not expected behavior. After further testing and introspection, I can sheepishly confirm this is due to our use of a service mesh (Linkerd in this case). Sorry for the confusion.