nerdexam
Docker

DCA · Question #147

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 this service on port 8080 will…

The correct answer is A. Yes. For a Kubernetes ClusterIP service configured to use port 8080 and route to targetPort: 80 on pods with label aPP: nginx, traffic to the service IP on 8080 is routed to port 80 of a matching pod.

Submitted by carter_n· Apr 18, 2026Networking

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 this service on port 8080 will be routed to port 80 in a random pod with the label aPP: nginx.

Options

  • AYes
  • BNo

How the community answered

(47 responses)
  • A
    96% (45)
  • B
    4% (2)

Why each option

For a Kubernetes ClusterIP service configured to use port 8080 and route to `targetPort: 80` on pods with label `aPP: nginx`, traffic to the service IP on 8080 is routed to port 80 of a matching pod.

AYesCorrect

A Kubernetes ClusterIP service acts as a stable virtual IP for backend pods. When configured with `port: 8080` and `targetPort: 80`, it receives traffic on port 8080 at its ClusterIP and then transparently redirects that traffic to port 80 on a randomly selected healthy pod matching its `selector: aPP: nginx`.

BNo

This statement accurately describes the core routing mechanism of a Kubernetes ClusterIP service, mapping a service port to a target port on selected pods.

Concept tested: Kubernetes ClusterIP service routing

Source: https://kubernetes.io/docs/concepts/services-networking/service/

Topics

#Kubernetes Service#ClusterIP#Port Mapping#Traffic Routing

Community Discussion

No community discussion yet for this question.

Full DCA Practice