A NodePort is a Kubernetes service type that exposes a service on a port of each cluster node.
A NodePort Service exposes a Service for external traffic through a static port on each cluster node while continuing to route traffic to its Pods. The node IP and exposed port are required; NodePort ports use the 30000–32768 range. section 6.4.2
Create and inspect a NodePort with these operational steps:
Generate a manifest imperatively with kubectl create svc nodeport no --node-port 30000 --tcp 443:80 --dry-run=client -o yaml > nodeport.yaml. section 6.4.2
Set the Service type to NodePort and add nodePort: 30000 under ports, then apply it with kubectl apply -f nodeport.yaml. section 6.4.2
Use NodePort for testing, but account for node-address and port knowledge, direct Pod exposure risk, and the absence of headless-Service support. section 6.4.2
How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it
How deep it goes
Defines exposure, port range, commands, YAML changes, verification, and limitations without detailing networking internals.
Examples
Uses kubectl commands, port 30000, node address 100.96.95.252, and kubectl get svc output.
What it assumes
Assumes familiarity with Pods, Services, kubectl, and basic declarative YAML.
What you can do after
Apply it via kubectl, expose a Service on a chosen node port, and verify the resulting Service mapping.
How it connects
Connects Services to Pods, ClusterIP, LoadBalancer, ingress, and CoreDNS.
Kubernetes in Action, Second EditionA NodePort Service is a Kubernetes Service type that exposes the service through a specified port on every cluster node as well as through its cluster IP.
Machine Learning Platform EngineeringA NodePort service is a Kubernetes service that exposes an application through a designated port on each cluster node.
servicekind of · A Kubernetes Service is an API resource that provides stable network access and service discovery for a changing set of Pods or other specified destinations.
clusterip service typecontrasts with · ClusterIP is a Kubernetes Service type that exposes selected Pods through a stable virtual IP address accessible only within the cluster.
load balancerused by · A load balancer is a hardware or software component that distributes incoming network traffic or requests among multiple destinations, such as servers or service instances.
ingress objectalternative to · A Kubernetes Ingress is an API resource that specifies rules for routing external HTTP and HTTPS requests to services within a cluster.
loadbalancer serviceproduced by · A Kubernetes LoadBalancer Service is a Service type that exposes workloads externally through a provisioned or integrated network load balancer.
hostPortcontrasts with · The Kubernetes hostPort field exposes a container port through a corresponding network port on the node hosting the pod.
This explainer was generated by Manning's knowledge graph from the text of Acing the Certified Kubernetes Administrator Exam, Second Edition. The section links point to the parts of the book it draws on.