spec.ports[0].nodePort: Invalid value: 80: provided port is not in the valid range. The range of valid ports is 30000-32767
A NodePort Service asked for a port outside the cluster’s NodePort range (default 30000–32767).
provided port is not in the valid rangeThe range of valid ports is 30000-32767nodePort: Invalid value Meaning
NodePorts are opened on every node and are restricted to a reserved range. To serve on 80/443, use a LoadBalancer Service or an Ingress controller, or (self-managed clusters) change --service-node-port-range.
Common causes
- nodePort set to 80/443/8080
- Confusing port, targetPort and nodePort fields
⚡ Quick fix
- Remove nodePort to let Kubernetes pick one
- Use a value 30000–32767
- Use LoadBalancer or Ingress for standard ports
Detailed fix by platform
YAML
- bash
spec: type: NodePort ports: - port: 80 # service port targetPort: 8080 # container port nodePort: 30080 # 30000-32767
How to diagnose
- Fields — port vs targetPort vs nodePort
- Range — API server --service-node-port-range
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 0x80070422 Windows Update error 0x80070422 (service is disabled)
- actively refused it HttpRequestException: No connection could be made because the target machine actively refused it (localhost:5001)
- CannotPullContainerError ECS task stopped: CannotPullContainerError: pull image manifest has been retried ... / ref pull has been retried
Most viewed in Kubernetes
- cannot re-use a name that is still in use Error: INSTALLATION FAILED: cannot re-use a name that is still in use
- error converting YAML to JSON error converting YAML to JSON: yaml: line 12: did not find expected key
- unknown field strict decoding error: unknown field "spec.template.spec.containers[0].ports[0].protocl"
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 12 Oct 2026