``` # By default and for convenience, the `targetPort` is set to the same value . . .

Malayamanas Panda:

# By default and for convenience, the `targetPort` is set to the same value as the `port` field.

Why is it convenient , what is the meaning of it ? https://kubernetes.io/docs/concepts/services-networking/service/#nodeport

Malayamanas Panda:
https://medium.com/swlh/kubernetes-services-part-1-399a0dd05211 Found this, but still NOT clear.

Jonathan Curran:
there’s usually not a reason for them to be different in simple examples

Malayamanas Panda:
It might be internal to the cluster . service can be accessed as NODEIP:NODEPORT , and may be the same service can be accessed as SERVICENAME:PORT for internal cluster traffic. Let me experiment .

Fernando Jimenez:
If you do not explicitly provide a targetPort number, one will be provided for it, which will match the same as a service port
Concerning the nodePort if the service type is NodePort (instead of ClusterIP or LoadBalancer) and you do not enter an expecific port number within the range 30000-32767, one will be entered automatically from that range.

Malayamanas Panda:
I can CONFIRM that , --port is the port of the service internal to the cluster and nodeport type service , exposes that internal clusterIP service to NODEIP:RANDOM(30000-32767) port URI. Thanks.