A NodePort service exposes an application through a designated port on every Kubernetes cluster node, forwarding requests to matching pods. This stable access layer remains available when pods move during scaling or node failures. section 3.3.4
Configure the traffic path with three ports:
- targetPort identifies the application port on the pod. section 3.3.4
- port identifies the service port that forwards to targetPort. section 3.3.4
- nodePort identifies the externally reachable node port and can range from 30,000 to 32,767. section 3.3.4
Expose an application
A NodePort manifest can map port 30420 on every node to port 80 on the service and port 8083 on pods selected by app: fast-api. Apply it with kubectl create -f node-port-service.yaml, then reach it at http://<node_IP>:30420.





