Service Configuration
medium

Questão de Service Configuration #019e3a4f

Enunciado da Questão
Service Configuration
#kubernetes
#kube-proxy
#networking
#packet-filtering
Médio

What Kubernetes component handles network communications inside and outside of a cluster, using operating system packet filtering if available?

A

kube-proxy

Correta
B

kubelet

C

etcd

D

kube-controller-manager

Explicação Oficial / Explicações da Comunidade

The component that handles network communications inside and outside of a Kubernetes cluster, using operating system packet filtering if available, is kube-proxy.

How it Works

kube-proxy is a network proxy that runs on each node in the cluster. It implements part of the Kubernetes Service concept by maintaining network rules that allow communication to Pods from network sessions inside or outside the cluster. It uses operating system packet filtering (e.g., iptables, IPVS) to direct traffic to the appropriate backend Pods based on Service definitions. When a Service is created, kube-proxy watches the API server for changes and updates the packet filtering rules accordingly.

Why kube-proxy is Correct

kube-proxy is specifically designed to handle network proxying and load balancing for Services. It leverages the node's OS packet filtering capabilities (like iptables) to efficiently route traffic. Without kube-proxy, Services would not be reachable via their ClusterIP or external endpoints.

Why Other Options are Incorrect

  • kubelet: The kubelet is the primary node agent that runs on each node. It ensures that containers are running in a Pod, but it does not handle network communications for Services. Its role is to manage Pod lifecycle, not network proxying.
  • etcd: etcd is a distributed key-value store used as Kubernetes' backing store for all cluster data. It stores configuration and state information but does not participate in network packet forwarding or filtering.
  • kube-controller-manager: This component runs controller processes that regulate the state of the cluster, such as ReplicationController, Endpoints, and others. It does not handle network traffic directly; it manages control loops that ensure the desired state of the cluster.