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

CKA study material · question 388 of 1000

A Service uses a named targetPort but no traffic arrives. What must be true of the Pods?

  1. They must expose a port with that exact name
  2. They must declare the port as a nodePort
  3. They must run on the same node as the Service
  4. They must set hostPort to the same value
Show the answer

Answer: A. They must expose a port with that exact name

A named targetPort only resolves when the Pods expose a port carrying that name.

Source: Debug Services (Kubernetes) — Is the Service defined correctly?

Challenge yourself on this topic → Study as cards