How to configure ingress gateway in istio?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
In Istio, exposing traffic from outside the cluster usually means configuring two resources together: a Gateway that defines what the ingress proxy should listen for, and a VirtualService that decides where matching requests should go. If one of those is missing or mismatched, external traffic will not reach your workload.
Understand the Pieces First
The ingress path usually looks like this:
- External client sends a request.
- Istio ingress gateway receives it.
- A
Gatewayresource matches the host and port. - A
VirtualServiceroutes the request to a Kubernetes service inside the mesh.
That means ingress setup is not just "open a port." You must align listeners, hosts, and destinations across multiple resources.
Create a Gateway
This example exposes HTTP traffic for example.com on port 80:
The selector must match the labels on the ingress gateway workload installed in your cluster. In default Istio installations, istio: ingressgateway is common, but you should verify the labels on your actual gateway deployment or service.
Route Traffic With a VirtualService
The VirtualService connects the external host to an internal Kubernetes service:
The host in the VirtualService must align with what the Gateway accepts. The destination host should be the Kubernetes service that fronts your application pods.
Apply and Verify the Configuration
Apply the manifests:
Then inspect the resources:
The ingress gateway service in istio-system usually exposes the external IP or load balancer hostname you need to test. If DNS is not configured yet, you can test with a manual Host header:
That is often the fastest way to confirm whether the routing rules are correct before waiting on DNS.
Add HTTPS Later, Not as a Guess
TLS configuration belongs on the Gateway resource. A basic HTTPS server block looks like this:
This assumes the TLS secret is already available to the ingress gateway through the expected credential mechanism. Do not add TLS blocks blindly. Verify how your cluster manages certificates first.
Debugging a Broken Ingress Path
When ingress does not work, check these in order:
- Does the ingress gateway service have an external address?
- Does the
Gatewayselector match the actual ingress gateway labels? - Do the
hostsvalues match the incoming request host? - Does the
VirtualServicereference the correct gateway name? - Does the destination service exist and expose the expected port?
If those line up, then inspect workload-level logs and, if needed, use Istio analysis tools to catch config mismatches before digging deeper.
Common Pitfalls
- Creating a
Gatewaybut forgetting the matchingVirtualService. - Using a host name in the
VirtualServicethat does not match theGatewayor client request. - Pointing the destination to a pod port conceptually instead of the actual Kubernetes service and service port.
- Assuming the default ingress gateway labels without checking the installed deployment.
- Mixing TLS and HTTP settings without verifying which port and protocol the client is actually using.
Summary
- Istio ingress usually requires both a
Gatewayand aVirtualService. - The
Gatewaydefines external listeners; theVirtualServicedefines routing. - Hosts, gateway names, selectors, and destination service ports must all align.
- Test early with
curland a manualHostheader before blaming DNS. - Most ingress failures come from mismatched config, not from Istio being opaque.
Related reading
- How to configure Ingress request timeouts on GKE
- how to configure ingress to direct traffic to an https backend using https
- How to configure Keycloak Helm Chart
- How to configure kubectl with cluster information from a .conf file?
- How to configure log-driver in kubernetes pods file?
- How to Configure Pod initialization in a specific order in Kubernetes?
- How to configure VPN connection between 2 Kubernetes clusters
- How to confirm minikube is using hyperkit

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.