Real World Istio
War Stories and Gotchas
Frederik Mogensen & Lasse Højgaard
▪ The Project
▪ Istio 101
▪ JWT Policy checking
▪ Mutual TLS
▪ Secure Egress
▪ Gotchas
Agenda
The Project
FUT - Telemedicine
Platform
▪ Helping chronically ill patients to live at
home
▪ Defining different questionnaires for
each illness
▪ Patients measuring and responding to
questionnaires daily
Photo by Jair Lázaro on Unsplash
Platform Focus
▪ Handling healthcare data demands a
high focus on
▪ Stability
▪ Observability
▪ Security
Photo by Philipp Katzenberger on Unsplash
Multi Tenant
Istio 101
In three minutes or less
Service mesh
“A service mesh is a configurable infrastructure layer for
a microservices application. It makes communication
between service instances flexible, reliable, and fast.
The mesh provides service discovery, load balancing,
encryption, authentication and authorization, support
for the circuit breaker pattern, and other capabilities.”
https://www.nginx.com/learn/service-mesh/
Istio 101
Istio 101
▪ Connect
▪ Ingress, Intelligent Routing, Load-balancing
▪ Secure
▪ AuthN/Z, mTLS, Namespace segregation, Egress
▪ Control
▪ Rate-limiting, White/Black Listing
▪ Observe
▪ Metrics, Telemetry, Access Logs
Grafana
Jaeger
Kiali
Istio 101 - Components
Use Cases
Enforcing JWT validation
on all request
Photo by Blake Guidry on Unsplash
JWT validation
https://blog.christianposta.com/how-a-service-mesh-can-help-with-microservices-security/
JWT validation - Gotcha
Kubelet
https://blog.christianposta.com/how-a-service-mesh-can-help-with-microservices-security/
Mutual encryption
Photo by Markus Spiske on Unsplash
Mutual encryption
https://www.infoq.com/articles/istio-security-mtls-jwt/
Citadel
mTLS - Gotcha
▪ Health Checks..?
▪ Kubelet does not know about mTLS, and is
therefore no longer allowed to talk to the
apps
Kubelet
JWT & mTLS
● JWT checking
● Permissive mTLS
Gotcha!
▪ Symptoms
▪ Non-deterministic behaviour for jobs
▪ The Clue
▪ Why are we getting 401’s for excluded endpoints?
Gotcha - Policy selected at random
▪ We thought: “these are separate policies, we can deploy them side-by-side”
▪ RTFM!
▪
▪ Solution: Merge the two policies into one
Gotcha - Policy selected at random
https://flickr.com/photos/31418530@N02/3635981474
Secure Egress
Gnurx @ /r/TechSupportGore
Secure Egress
Used to be enabled by default, changed in Istio 1.2
Secure Egress
Secure Egress - Gotcha!
Other Random Gotchas
Jobs with sidecars
Photo by David Tostado on Unsplash
Gotcha - Jobs with sidecars
▪ Kubernetes enhancement issue #753
Gotcha - Jobs with sidecars
Gotcha - Jobs with sidecars
▪ Kubernetes enhancement issue #753
▪ Need sidecar ready before main container runs
▪ When the main container completes sidecar continues running
▪ Jobs never complete
▪ PR almost made it into Kubernetes 1.16
▪ Hopefully in 1.17
▪ Workarounds
▪ Wrap in shell-script or https://github.com/monzo/envoy-preflight
▪ Istio 1.3:
▪ Manually POST to http://localhost:15020/quitquitquit
Gotcha - Jobs with sidecars - “fix”
▪ Resulting in no mTLS between jobs and deployments
Frequent upgrades
Photo by Djim Loic on Unsplash
Gotcha - Frequent upgrades
▪ Bleeding edge software 🔪
▪ Sometimes you find errors 🤷
▪ Things quickly gets fixed 👏
🖼 Czar @ WikiMedia Commons
Release cadence
▪ LTS release every quarter
▪ Supported 3 months after next LTS
Bug: 1.0.6 -> 1.1.6 upgrade
Other possibilities
The Istio toolbox
▪ Authorization
▪ Retry-policies
▪ Circuit breakers
▪ Fault injection
▪ Rate limiting
▪ Traffic mirroring
▪ Distributed tracing
▪ Metric collection
▪ Service graph
▪ Locality based load balancing
▪ ...
▪
Photo by Barn Images on Unsplash
Wrap-up
▪ Extremely powerful tool.
▪ Complex configuration
▪ RTFM
Thank You
Lasse Højgaard
lho@trifork.com
Frederik Mogensen
fmo@trifork.com

Cloud Native Nordics - Real world Istio