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

CKA study material · question 874 of 1000

A Service manifest written in JSON has "targetPort": "9376". What is wrong?

  1. Nothing; the quotes are ignored
  2. targetPort must always be a named port
  3. The quoted value is a port name, not the number 9376
  4. targetPort may not be set on a ClusterIP Service
Show the answer

Answer: C. The quoted value is a port name, not the number 9376

A quoted numeric port is read as a name, and unless the Pod exposes a port with that name nothing matches — an easily missed misconfiguration the debugging guide calls out.

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

Challenge yourself on this topic → Study as cards