Study. uk . com
  1. Home
  2. All questions
  3. Question 202

CKA study material · question 202 of 1000

Why would an administrator use a named targetPort instead of a number?

  1. Numbers are not allowed in multi-port Services
  2. Named ports are resolved faster by kube-proxy
  3. Named ports bypass NetworkPolicy
  4. Different Pods can expose the same name on different port numbers
Show the answer

Answer: D. Different Pods can expose the same name on different port numbers

A named targetPort lets one Service serve Pods that expose the same logical port on different numbers.

Source: Service (Kubernetes) — Port definitions

Challenge yourself on this topic → Study as cards