Sobes.tech
Junior — Middle

How is access to the external IP address of the Load Balancer through Ingress in Kubernetes implemented?

sobes.tech AI

Answer from AI

In Kubernetes, Ingress is used for routing external traffic to services within the cluster. When Ingress is configured with the LoadBalancer type, the cloud provider creates an external load balancer with a public IP address.

Access to the Load Balancer's external IP via Ingress occurs as follows:

  1. Discover the external IP assigned to the Ingress controller (e.g., via kubectl get ingress or kubectl get svc for the Ingress service).
  2. Clients send HTTP/HTTPS requests to this external IP.
  3. The Ingress controller receives the requests and, according to routing rules, forwards them to the appropriate services inside the cluster.

Example:

kubectl get ingress my-ingress
NAME         CLASS    HOSTS   ADDRESS          PORTS   AGE
my-ingress   <none>   *       34.123.45.67     80      10m

The external IP 34.123.45.67 is the address of the Load Balancer through which access to applications configured in Ingress is made.