Kubernetes and Cloud Native Associate (KCNA) — Question 35
Can a Kubernetes Service expose multiple ports?
Answer options
- A. No, you can only expose one port per each Service.
- B. Yes, but you must specify an unambiguous name for each port.
- C. Yes, the only requirement is to use different port numbers.
- D. No, because the only port you can expose is port number 443.
Correct answer: B
Explanation
The correct answer is B because Kubernetes Services can expose multiple ports, but each port must have a unique name to avoid ambiguity. Options A and D are incorrect as they state that only one port can be exposed, which is not true. Option C is misleading because while different port numbers can be used, naming each port is also a requirement.