DCA · Question #148
The Kubernetes yaml shown below describes a clusterIP service. Is this a correct statement about how this service routes requests? Solution: Traffic sent to the IP of any pod with the label app: nginx
The correct answer is A. Yes. The statement describes how traffic sent directly to a pod's IP on a specific port might be internally handled, which is separate from a Kubernetes ClusterIP service's routing function.
Question
The Kubernetes yaml shown below describes a clusterIP service. Is this a correct statement about how this service routes requests? Solution: Traffic sent to the IP of any pod with the label app: nginx on port 8080 will be forwarded to port 80 in that pod.
Options
- AYes
- BNo
How the community answered
(25 responses)- A92% (23)
- B8% (2)
Why each option
The statement describes how traffic sent directly to a pod's IP on a specific port might be internally handled, which is separate from a Kubernetes ClusterIP service's routing function.
While a Kubernetes ClusterIP service routes traffic from `service-ip:service_port` to `pod-ip:target_port`, it is plausible for an individual pod, identified by `app: nginx`, to be configured internally to listen on port 8080 and forward those requests to port 80 within its own containers. This describes a direct interaction with the pod's specific internal configuration, not the service's abstraction.
This statement refers to direct access to a pod's IP address and its internal port forwarding, which is distinct from how a Kubernetes ClusterIP service routes incoming requests to the service's IP.
Concept tested: Pod direct access vs. Kubernetes service routing
Source: https://kubernetes.io/docs/concepts/services-networking/service/
Topics
Community Discussion
No community discussion yet for this question.