Networking
medium

Questão de Networking #019e3a4f

Enunciado da Questão
Networking
#ingress
#kubernetes
#networking
#service
Médio

Which statement about Ingress is correct?

A

Ingress provides a simple way to track network endpoints within a cluster.

B

Ingress is a Service type like NodePort and ClusterIP.

C

Ingress is a construct that allows you to specify how a Pod is allowed to communicate.

D

Ingress exposes routes from outside the cluster to services in the cluster.

Correta

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

Ingress is a Kubernetes resource that manages external access to services within a cluster, typically HTTP/HTTPS traffic. It provides load balancing, SSL termination, and name-based virtual hosting.

How it Works
Ingress exposes HTTP and HTTPS routes from outside the cluster to services inside the cluster. Traffic routing is controlled by rules defined on the Ingress resource. An Ingress controller (e.g., NGINX, Traefik) must be deployed in the cluster to fulfill the Ingress rules.

Why the correct statement is right
The statement "Ingress exposes routes from outside the cluster to services in the cluster" is correct because Ingress is specifically designed to provide external access to cluster services, typically via HTTP/HTTPS. It acts as a layer 7 load balancer, routing external requests to the appropriate service based on hostnames or paths.

Why the incorrect statements are wrong

  • "Ingress provides a simple way to track network endpoints within a cluster" is incorrect. Tracking network endpoints is typically done by Services (e.g., ClusterIP) or Endpoints resources, not Ingress.
  • "Ingress is a Service type like NodePort and ClusterIP" is incorrect. Ingress is not a Service type; it is a separate API resource. Service types include ClusterIP, NodePort, LoadBalancer, and ExternalName.
  • "Ingress is a construct that allows you to specify how a Pod is allowed to communicate" is incorrect. Pod communication policies are defined by Network Policies, not Ingress. Ingress deals with external-to-service traffic, not pod-to-pod communication.