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

CKA study material · question 709 of 1000

A headless Service is created without a selector. What constraint applies to its ports?

  1. port and targetPort must be equal
  2. Only one port may be declared
  3. The port must be inside the node port range
  4. targetPort must be a named port
Show the answer

Answer: A. port and targetPort must be equal

For a selectorless headless Service the port and targetPort must match, since there is no proxy layer to translate between the two.

Source: Service (Kubernetes) — Headless Services › Without selectors

Challenge yourself on this topic → Study as cards