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:
- Discover the external IP assigned to the Ingress controller (e.g., via
kubectl get ingressorkubectl get svcfor the Ingress service). - Clients send HTTP/HTTPS requests to this external IP.
- 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.