In this post we'll learn how to use the Istio service mesh by building one. We create an Amazon EKS cluster with Terraform, install Istio with Helm, and deploy two versions of a small Node.js app. Then we apply six YAML files, one at a time. After each file you run a command and see what changed.
By the end you'll have done each of these yourself:
Added a proxy to every pod without changing the app
Sent 80% of users to v1 and 20% to v2 (a canary release)
Routed testers straight to v2 using a request header
Shifted traffic between versions without redeploying
Encrypted service-to-service traffic and blocked a client that wasn't in the mesh
Allowed GET requests and blocked POST requests based on the caller's identity
All the code is in the GitHub repo .
What is a service mesh?
Picture every pod in your cluster with a small assistant standing next to it. Every request in or out of the pod goes through that assistant first.β¦