There are three kinds of ports widely used in kubernetes resource management, for example:
port is the port exposed within the cluster. so other nodes/pods from same cluster can access it through service:port
targetPort is the port exposed from within the pod.
nodePort is the port exposed to outside world. so on public network, it could be accessed as public-ip:nodePort
- port: 443
- nodePort: 31234