About this scenario
Last night the platform team set the mesh's outboundTrafficPolicy to REGISTRY_ONLY. Sidecars now drop traffic to any host outside the cluster unless a ServiceEntry registers it. Each team has to register what it calls.
In shop, checkout calls the payment provider at https://api.stripe.com. Someone added a ServiceEntry for it, yet calls fail. notifier posts to http://alerts.partner.example, and its ServiceEntry, partner-serviceentry.yaml in the editor, is refused when you apply it.
Get both calls through, and keep every other site blocked. Test with kubectl exec deploy/checkout -- curl -sS -m 5 https://api.stripe.com.
Objectives
- See what checkout's sidecar does with the call
- checkout reaches https://api.stripe.com
- notifier reaches http://alerts.partner.example
- The mesh stays REGISTRY_ONLY, and other sites such as https://example.org stay blocked
What you'll practice
outboundTrafficPolicy.mode in the mesh config decides what happens to hosts Istio doesn't know. ALLOW_ANY passes them through, and REGISTRY_ONLY sends them to BlackHoleCluster: HTTP gets a 502 and TLS is reset.- A ServiceEntry adds an outside host to the mesh's registry, so sidecars get a cluster for it, such as
outbound|443||api.stripe.com. - The port's protocol tells the sidecar how to read the traffic. When the app does TLS itself, declare
TLS (or HTTPS), and the sidecar routes by SNI without decrypting. HTTP on a TLS port gives 400 DPE in the log and wrong version number in curl. - With
resolution: DNS every host must be a full name. Wildcards need resolution: NONE, which trusts whatever address the app resolved. - REGISTRY_ONLY in the sidecar is not a security boundary on its own: a Pod without a sidecar bypasses it. Pair it with NetworkPolicy, or an egress gateway, for traffic that must not leave.
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.