Clients call Service port 80, the container listens on 8080, and traffic never arrives. Which mapping is correct to fix the blackhole?
Select an answer to reveal the explanation.
Short Explanation
Clients knock on the Service’s front door (port 80); the app answers down the hall on 8080. targetPort is the hallway number—point it at 8080. Mixing those up is how you get a perfectly “healthy” blackhole.
Full Explanation
Service port is the port clients use on the Service VIP. targetPort is where that traffic is sent on each Pod, and it must match the container’s listening port (here 8080), whether numeric or named. containerPort documents the container listen port but does not by itself rewire Service targetPort. hostPort is a separate, usually discouraged exposure mechanism and is not required to fix this mapping.