Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Kubernetes and Cloud Native Associate · Linux Foundation
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
The name field for each port in the spec.ports array of a Kubernetes Service is optional. The Service will function correctly as long as the port numbers are unique and properly configured. However, including port names is a best practice for clarity and compatibility with other Kubernetes features
A Kubernetes Service can expose multiple ports, and this is commonly used when: An application exposes multiple protocols (e.g., HTTP and gRPC) Different components need to be accessed on different ports (e.g., HTTP on 80, metrics on 8080) However, if multiple ports are defined, each port must have a unique name — especially when using protocols like HTTP/2 or gRPC, which rely on port names to route correctly (e.g., in service meshes like Istio or Linkerd). A. No, you can only expose one port per each Service: ❌ Incorrect — Services can expose multiple ports. C. Yes, the only requirement is to use different port numbers: ❌ Partially correct — different ports are required, but naming is also required for disambiguation. D. No, because the only port you can expose is port number 443: ❌ False — Services can expose any valid port number, not just 443.
This discussion is very divided. But in a multiport definition, the name is optional. By networking logic, binding a port two times is not allowed.