Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Istio "intercept" traffic for other containers?

Tags:

istio

The docs state that Envoy proxies "...mediate and control all network communication between microservices": https://istio.io/latest/docs/ops/deployment/architecture/

How does that work? When I want my program to make connection to an arbitrary hostname, say, "google.com" or "something.default.svc.cluster.local", I'll make two OS calls: gethostbyname and connect. How would Envoy, running in another container, "intercept" this? How will it know when I'm accessing "google.com" or a k8s service?

If there is an online doc that explains it, I'd appreciate a link.

like image 441
Yuri Geinish Avatar asked Oct 24 '25 17:10

Yuri Geinish


1 Answers

Istio has an Init Container which redirects traffic from/to the application container to the sidecar using iptables. This article from Istio documentation explains it.

There is also an alternative using CNI instead of the Init container.

like image 75
user140547 Avatar answered Oct 28 '25 03:10

user140547