300-910 · Question #44
Refer to the exhibit. What are the properties of the load balancer in a Kubernetes environment?
The correct answer is B. Has exposed ports 80 and 8080 to a public IP address and directs incoming connections to the port named nginx-port. The question asks about the properties of a Kubernetes LoadBalancer, implying common configuration and behavior, even without an exhibit.
Question
Options
- AHas exposed ports 80 and 8080 to a private IP address and directs outgoing connections to the port named http-port1
- BHas exposed ports 80 and 8080 to a public IP address and directs incoming connections to the port named nginx-port
- CForwards incoming traffic from the port named nginx-port to ports 80 and 8080 of nginxapp
- DForwards any outgoing traffic from the port named nginx-port to exposed ports http-port1 and http-port2 of nginxapp
How the community answered
(42 responses)- A5% (2)
- B88% (37)
- C2% (1)
- D5% (2)
Why each option
The question asks about the properties of a Kubernetes LoadBalancer, implying common configuration and behavior, even without an exhibit.
LoadBalancer services are primarily for exposing services to the public internet, not typically just a private IP, unless explicitly configured for internal load balancing. It also handles incoming, not outgoing, connections.
A Kubernetes Service of type LoadBalancer typically provisions an external, publicly accessible IP address (if the cloud provider supports it) and exposes specified ports (like 80 and 8080) on that public IP. It then directs incoming connections to target ports of the underlying pods, often identified by a `targetPort` or named port (like `nginx-port` which would map to the container port).
Load balancers forward incoming traffic from an exposed service port (e.g., 80 or 8080) to the target port (like `nginx-port`) of the backend pods, not the other way around.
Load balancers handle incoming traffic to the service, not outgoing traffic. The concept of forwarding outgoing traffic from a specific port name to exposed ports is incorrect for a LoadBalancer Service.
Concept tested: Kubernetes LoadBalancer Service properties
Source: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
Topics
Community Discussion
No community discussion yet for this question.