A Pod using `hostPort: 8080` is Pending with `node(s) didn't have free ports for the requested pod ports`.
IntermediateTroubleshootingScheduling and Pending Pods
Answer
Likely causes → hostPort makes a port exclusive per node. During a rolling update the new Pod needs the same host port on a node where the old one still runs, or another DaemonSet already uses it.
Diagnose →
kubectl get pods -A -o json | jq -r '.items[] | select(.spec.containers[].ports[]?.hostPort==8080) | "\(.metadata.namespace)/\(.metadata.name) \(.spec.nodeName)"'
Fix → Drop hostPort and use a Service. If it is genuinely required (node-local agents), set the rollout to maxSurge: 0, maxUnavailable: 1 so the old Pod frees the port first.
Prevent → Treat hostPort/hostNetwork as exceptions approved by the platform team; block them by policy elsewhere.
More on Scheduling and Pending Pods
Pods are Pending with `0/5 nodes are available: 5 Insufficient cpu. preemption: 0/5 nodes are available: 5 No preemption victims found for incoming pod.`Beginner`kubectl top nodes` shows nodes at 20% CPU, yet new Pods fail with `Insufficient cpu`. Explain it to a developer.Beginner`0/4 nodes are available: 1 node(s) had untolerated taint {node-role.kubernetes.io/control-plane: }, 3 node(s) had untolerated taint {dedicated: gpu}`.BeginnerA StatefulSet Pod is Pending with `pod has unbound immediate PersistentVolumeClaims`.Beginner`0/3 nodes are available: 3 node(s) didn't match Pod's node affinity/selector.`BeginnerA 6-replica Deployment has 3 Pods Running and 3 Pending: `0/3 nodes are available: 3 node(s) didn't match pod anti-affinity rules`.Intermediate