A Deployment defines a container port named http on 8080. How can a probe reference that port clearly?
Select an answer to reveal the explanation.
Short Explanation
Named ports are sticky notes on the wiring diagram—http means ‘whatever number we labeled http.’ Point the probe’s port at that name and it follows the containerPort definition. You avoid chasing magic numbers when the listen port changes.
Full Explanation
Probe handlers accept a numeric port or a port name that matches a containerPort.name on the same container. Referencing http keeps probes aligned when the numeric port is updated in one place. Using unrelated numbers, hostPort assumptions, or Service ClusterIP values as the probe port is incorrect.