DELAPARRA
Index
Color
NL
Category: Kubernetes

NodePort

Explained by Updated

What is NodePort?

NodePort: A Service that opens the same high port (30000–32767) on every node. External traffic hitting any node IP on that port reaches the Service. A NodePort Service in Kubernetes opens the same port, in the range 30000 to 32767, on every node in the cluster. Traffic sent to any node's IP address on that port is forwarded to the Service's pods.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about NodePort

How is NodePort used in practice?

It is a simple way to reach a service from outside the cluster without a cloud load balancer, which makes it common in local clusters and bare-metal setups.

What should you keep in mind with NodePort?

For production web traffic it is rarely the best choice. The high port numbers are awkward for users, and you need to handle which node IPs to use and what happens when a node disappears. A LoadBalancer Service or an Ingress controller usually sits in front instead, and those often use NodePorts internally. Make sure firewalls do not leave NodePorts open to the internet by accident.

What does an example of NodePort look like?

spec: type: NodePort ports: - port: 80 targetPort: 8080 nodePort: 30080

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with N

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.