nerdexam
Cisco

300-910 · Question #114

What is used by Kubernetes for access on the matching pods?

The correct answer is D. targetPort. In a Kubernetes Service definition, targetPort specifies the port on the pod's container that the Service proxy forwards traffic to when accessing matching pods.

Application Deployment and Operations

Question

What is used by Kubernetes for access on the matching pods?

Exhibit

300-910 question #114 exhibit

Options

  • AvirtualPort
  • Bport
  • CNodePort
  • DtargetPort

How the community answered

(23 responses)
  • B
    4% (1)
  • D
    96% (22)

Why each option

In a Kubernetes Service definition, targetPort specifies the port on the pod's container that the Service proxy forwards traffic to when accessing matching pods.

AvirtualPort

virtualPort is not a valid Kubernetes Service field and does not exist in the Kubernetes API specification.

Bport

The port field defines the port on the Service itself (the ClusterIP) that clients connect to, not the port on the pod container receiving the traffic.

CNodePort

NodePort is a Service type and field that exposes the Service on a static port on each node's external IP, not the port used to access the matching pod's container.

DtargetPortCorrect

The targetPort field in a Kubernetes Service spec identifies the specific port on the backing pods where the application is listening, and kube-proxy uses this value to route incoming connections from the Service's clusterIP port directly to the correct container port on each matching pod.

Concept tested: Kubernetes Service targetPort pod access configuration

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

Topics

#Kubernetes#Services#Pods#Networking

Community Discussion

No community discussion yet for this question.

Full 300-910 Practice