About this scenario
The shop namespace runs storefront, the web front end on port 80, and orders-api on port 8080, which serves /orders. Both should be public at http://shop.example.com: the site at /, and the API under /api/, so /api/orders reaches /orders on orders-api.
A teammate applied a Gateway and a VirtualService, both named storefront, for Istio's ingress gateway in istio-system. DNS for shop.example.com already points at the gateway's load balancer, but curl http://shop.example.com/ from the terminal can't even connect.
Get both URLs working through the gateway. Don't expose the Services another way.
Objectives
- Ask Istio what's wrong
- http://shop.example.com/ shows the shop
- http://shop.example.com/api/orders returns the orders
- Traffic still comes in through the Istio gateway only
What you'll practice
- Istio's ingress gateway is an Envoy Deployment behind a LoadBalancer Service. A Gateway resource configures it: its
selector picks the gateway Pods by label, and its servers open ports for a list of hosts. - A VirtualService binds to a Gateway through
gateways. A name without a namespace means the VirtualService's own namespace. Without the field it applies only to sidecars (mesh), and listing gateways turns mesh off unless you list it too. - The gateway answers
404 NR when no route matches the host and path. A 404 with via_upstream in the log came from the app. rewrite.uri replaces the part of the path a prefix match matched, so /api/orders reaches the backend as /orders.istioctl analyze catches most of these before any traffic: a selector that matches no Pod, a gateway that doesn't exist, or a host the Gateway doesn't serve.
How the playground works
The cluster runs entirely in your browser: a simulated API server, scheduler, kubelets and controllers, with virtual nodes in three zones. kubectl output follows the real formats, errors use the real messages, and the add-ons (CSI storage, Traefik, Envoy Gateway, cert-manager, Helm, Flux, Argo CD, Kyverno, Cilium, Istio) behave like their real counterparts for the common paths. It's a simulation, so some behavior is simplified. Your progress is saved in this browser.