Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsMedium

A network engineer wants to expose a web application running in a Kubernetes cluster to external internet traffic. The application is served by multiple Pods, and traffic needs to be load-balanced across them. Which Kubernetes object is specifically designed to provide stable external network access and load balancing for a set of Pods?

  1. AIngress
  2. BClusterIP Service
  3. CNodePort Service
  4. DLoadBalancer Service
Show answer & explanation

Correct answer: D. LoadBalancer Service

A LoadBalancer Service is specifically designed to expose a Service externally using a cloud provider's load balancer. It automatically provisions an external IP address and balances traffic across the Pods managed by the Service, satisfying both external access and load balancing requirements.

Why the other options are wrong

  • A. Ingress manages external access to services, typically for HTTP/HTTPS, and requires an Ingress controller, but a LoadBalancer Service directly provides the external IP and load balancing.
  • B. A ClusterIP Service provides internal-only access within the cluster.
  • C. A NodePort Service exposes the application on a static port on each Node's IP, but doesn't provision an external load balancer or IP automatically.

Kubernetes LoadBalancer Service

A Kubernetes Service type that exposes a Service externally using a cloud provider's load balancer.

  • Automatically provisions an external IP address.
  • Distributes external traffic across the backend Pods.
  • Requires integration with a cloud provider (e.g., AWS ELB, GCP Load Balancer).

Memory trick: LoadBalancer is the 'big truck' that brings 'traffic' from the 'internet' to your 'app'.

More Kubernetes Fundamentals questions