Targetport — Certified Kubernetes App Developer (CKAD) Practice Questions
targetPort is the port on the Pod or container to which a Kubernetes Service forwards incoming traffic, distinct from the port field, which is the port the Service itself exposes to consumers. The CKAD exam frequently requires you to wire up a Service correctly by matching targetPort to the containerPort declared in the Pod spec, and a mismatch silently breaks connectivity. You can specify targetPort as a number or as a named port if the container declares named ports, which improves maintainability. Getting this mapping right is a practical skill tested directly in the hands-on performance-based tasks.
Free questions on targetport
How do you expose a Deployment on a specific port?
Free question · easy · full answer + explanation