SlideShare a Scribd company logo
Istio by Example (extended version)
Why?
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Istio by Example (extended version)
Atomic Architecture
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Istio by Example (extended version)
Istio by Example (extended version)
Library Bloat
Istio by Example (extended version)
Istio by Example (extended version)
Istio by Example (extended version)
Istio by Example (extended version)
Setting the sails with
Istio
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Features
Traffic Management Resiliency Security Observability
Request Routing Timeouts mTLS Metrics
Load Balancing Circuit Breaker Access Control Logs
Traffic Shifting Health Checks (active,
passive)
Workload Identity Traces
Traffic Mirroring Retries RBAC
Service Discovery Rate Limiting
Ingress, Egress Delay & Fault Injection
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Istio by Example (extended version)
Deploy Istio & Sample App
curl -L https://git.io/getLatestIstio | sh -
cd istio-*
export PATH=$PWD/bin:$PATH
# deploy istio with mTLS enabled by default
kubectl apply -f install/kubernetes/istio-auth.yaml
# ... lengthy copy & paste code to deploy sidecar auto-deployment
# label default namespace to be auto-sidecarred
kubectl label namespace default istio-injection=enabled
# deploy and open sample application
kubectl apply -f istio-*/samples/bookinfo/kube/bookinfo.yaml
open http://localhost/productpage
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: gateway
annotations:
kubernetes.io/ingress.class: "istio"
spec:
rules:
- http:
paths:
- path: /productpage
backend:
serviceName: productpage
servicePort: 9080
- path: /login
backend:
serviceName: productpage
servicePort: 9080
- path: /logout
backend:
serviceName: productpage
servicePort: 9080
- path: /api/v1/products.*
backend:
serviceName: productpage
servicePort: 9080
Sample Application: BookInfo1
1
Istio BookInfo Sample (https://istio.io/docs/guides/bookinfo.html)
Deploy Observability Add-Ons
#Prometheus
kubectl apply -f istio-*/install/kubernetes/addons/prometheus.yaml
kubectl expose deployment prometheus --name=prometheus-expose
--port=9090 --target-port=9090 --type=LoadBalancer -n=istio-system
#Grafana
kubectl apply -f istio-*/install/kubernetes/addons/grafana.yaml
kubectl expose deployment grafana --name=grafana-expose
--port=3000 --target-port=3000 --type=LoadBalancer -n=istio-system
#Jaeger
kubectl apply -n istio-system -f
https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/
master/all-in-one/jaeger-all-in-one-template.yml
kubectl expose deployment jaeger-deployment --name=jaeger-expose
--port=16686 --target-port=16686 --type=LoadBalancer -n=istio-system
#EFK
kubectl apply -f logging-stack.yaml
kubectl expose deployment kibana --name=kibana-expose
--port=5601 --target-port=5601 --type=LoadBalancer -n=logging
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Observe Services
# Logs
istioctl create -f fluentd-istio.yaml
# Metrics
istioctl create -f telemetry.yaml
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Istio by Example (extended version)
Canary Releases: A/B Testing
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: reviews-test-v2
spec:
destination:
name: reviews
precedence: 2
match:
request:
headers:
cookie:
regex: "^(.*?;)?(user=jason)(;.*)?$"
route:
- labels:
version: v2
istioctl create -f route-rule-reviews-test-v2.yaml
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Canary Releases: Rolling Upgrade
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: reviews-default
spec:
destination:
name: reviews
precedence: 1
route:
- labels:
version: v1
weight: 50
- labels:
version: v3
weight: 50
istioctl create -f route-rule-reviews-50-v3.yaml
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Canary Releases: Blue/Green
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: reviews-default
spec:
destination:
name: reviews
precedence: 1
route:
- labels:
version: v3
weight: 100
istioctl replace -f route-rule-reviews-v3.yaml
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Security: Access Control
apiVersion: "config.istio.io/v1alpha2"
kind: denier
metadata:
name: denyreviewsv3handler
spec:
status:
code: 7
message: Not allowed
---
apiVersion: "config.istio.io/v1alpha2"
kind: checknothing
metadata:
name: denyreviewsv3request
spec:
---
apiVersion: "config.istio.io/v1alpha2"
kind: rule
metadata:
name: denyreviewsv3
spec:
match: source.labels["layer"]=="inner" && destination.labels["layer"] == "outer"
actions:
- handler: denyreviewsv3handler.denier
instances: [ denyreviewsv3request.checknothing ]
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Security: Egress
apiVersion: networking.istio.io/v1alpha3
kind: ExternalService
metadata:
name: google-ext
spec:
hosts:
- www.google.com
ports:
- number: 443
name: https
protocol: http
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: google-ext
spec:
name: www.google.com
trafficPolicy:
tls:
mode: SIMPLE # initiates HTTPS when talking to www.google.com
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Resiliency: Circuit Breaker
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: httpbin
spec:
name: httpbin
trafficPolicy:
connectionPool:
tcp:
maxConnections: 100
http:
http1MaxPendingRequests: 1
maxRequestsPerConnection: 1
outlierDetection:
http:
consecutiveErrors: 1
interval: 1s
baseEjectionTime: 3m
maxEjectionPercent: 100
Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
Istio by Example (extended version)

More Related Content

PPTX
Istio a service mesh
PDF
Introduction to Istio on Kubernetes
PDF
Istio Service Mesh
PPTX
ISTIO Deep Dive
PDF
Stop reinventing the wheel with Istio by Mete Atamel (Google)
PDF
Introduction to Istio Service Mesh
PDF
Istio on Kubernetes
PPTX
Microservices With Istio Service Mesh
Istio a service mesh
Introduction to Istio on Kubernetes
Istio Service Mesh
ISTIO Deep Dive
Stop reinventing the wheel with Istio by Mete Atamel (Google)
Introduction to Istio Service Mesh
Istio on Kubernetes
Microservices With Istio Service Mesh

What's hot (20)

ODP
Istio
PDF
Istio service mesh: past, present, future (TLV meetup)
PDF
The elegant way of implementing microservices with istio
PPTX
Istio - A Service Mesh for Microservices as Scale
PDF
Istio : Service Mesh
PDF
Benchmarking Service Meshes - CNCF Networking WG
PDF
Istio: Using nginMesh as the service proxy
PDF
Securing Microservices with Istio
PDF
Managing traffic routing with istio and envoy workshop
PDF
Managing Microservices With The Istio Service Mesh on Kubernetes
PDF
Service Mesh on Kubernetes with Istio
PPTX
Service mesh
PDF
From zero to hero with Kubernetes and Istio
PPTX
Microservices on kubernetes
PDF
Istio Service Mesh
PDF
Managing microservices with Istio Service Mesh
PDF
The service mesh: resilient communication for microservice applications
PPTX
O'Reilly 2017: "Introduction to Service Meshes"
PDF
Demystifying Service Mesh
PPTX
istio: service mesh for all
Istio
Istio service mesh: past, present, future (TLV meetup)
The elegant way of implementing microservices with istio
Istio - A Service Mesh for Microservices as Scale
Istio : Service Mesh
Benchmarking Service Meshes - CNCF Networking WG
Istio: Using nginMesh as the service proxy
Securing Microservices with Istio
Managing traffic routing with istio and envoy workshop
Managing Microservices With The Istio Service Mesh on Kubernetes
Service Mesh on Kubernetes with Istio
Service mesh
From zero to hero with Kubernetes and Istio
Microservices on kubernetes
Istio Service Mesh
Managing microservices with Istio Service Mesh
The service mesh: resilient communication for microservice applications
O'Reilly 2017: "Introduction to Service Meshes"
Demystifying Service Mesh
istio: service mesh for all
Ad

Similar to Istio by Example (extended version) (20)

PDF
Istio Playground
PDF
Ports, pods and proxies
PPTX
Istio canaries and kubernetes
PDF
OSS Japan 2019 service mesh bridging Kubernetes and legacy
PPTX
使用 Prometheus 監控 Kubernetes Cluster
PDF
Weave Your Microservices with Istio
PDF
All Things Open 2019 weave-services-istio
PDF
Ato2019 weave-services-istio
PDF
Serving models using KFServing
PDF
Kubernetes extensibility
PDF
Swift Cloud Workshop - Swift Microservices
PDF
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
PDF
Lessons learned using GitOps
PDF
DCEU 18: Docker Container Networking
PDF
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
PPTX
From 0 to 60 with kubernetes and istio
PDF
Istio Playground
PDF
給 RD 的 Kubernetes 初體驗 (EKS version)
PPTX
Kubernetes and Istio
PDF
GE Predix 新手入门 赵锴 物联网_IoT
Istio Playground
Ports, pods and proxies
Istio canaries and kubernetes
OSS Japan 2019 service mesh bridging Kubernetes and legacy
使用 Prometheus 監控 Kubernetes Cluster
Weave Your Microservices with Istio
All Things Open 2019 weave-services-istio
Ato2019 weave-services-istio
Serving models using KFServing
Kubernetes extensibility
Swift Cloud Workshop - Swift Microservices
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
Lessons learned using GitOps
DCEU 18: Docker Container Networking
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
From 0 to 60 with kubernetes and istio
Istio Playground
給 RD 的 Kubernetes 初體驗 (EKS version)
Kubernetes and Istio
GE Predix 新手入门 赵锴 物联网_IoT
Ad

More from QAware GmbH (20)

PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
PDF
Frontends mit Hilfe von KI entwickeln.pdf
PDF
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
PDF
50 Shades of K8s Autoscaling #JavaLand24.pdf
PDF
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
PPTX
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
PDF
Down the Ivory Tower towards Agile Architecture
PDF
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
PDF
Make Developers Fly: Principles for Platform Engineering
PDF
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
PDF
Was kommt nach den SPAs
PDF
Cloud Migration mit KI: der Turbo
PDF
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
PDF
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
PDF
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
PDF
Kubernetes with Cilium in AWS - Experience Report!
PDF
50 Shades of K8s Autoscaling
PDF
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
PDF
Service Mesh Pain & Gain. Experiences from a client project.
PDF
50 Shades of K8s Autoscaling
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
Frontends mit Hilfe von KI entwickeln.pdf
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
50 Shades of K8s Autoscaling #JavaLand24.pdf
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Down the Ivory Tower towards Agile Architecture
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
Make Developers Fly: Principles for Platform Engineering
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
Was kommt nach den SPAs
Cloud Migration mit KI: der Turbo
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Kubernetes with Cilium in AWS - Experience Report!
50 Shades of K8s Autoscaling
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Service Mesh Pain & Gain. Experiences from a client project.
50 Shades of K8s Autoscaling

Recently uploaded (20)

PPTX
1_Introduction to advance data techniques.pptx
PDF
Foundation of Data Science unit number two notes
PPTX
Global journeys: estimating international migration
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPT
Reliability_Chapter_ presentation 1221.5784
PDF
Introduction to Business Data Analytics.
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PDF
Lecture1 pattern recognition............
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPT
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
PPT
Quality review (1)_presentation of this 21
PDF
Mega Projects Data Mega Projects Data
PPTX
Computer network topology notes for revision
1_Introduction to advance data techniques.pptx
Foundation of Data Science unit number two notes
Global journeys: estimating international migration
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
.pdf is not working space design for the following data for the following dat...
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Supervised vs unsupervised machine learning algorithms
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Reliability_Chapter_ presentation 1221.5784
Introduction to Business Data Analytics.
Galatica Smart Energy Infrastructure Startup Pitch Deck
Introduction to Knowledge Engineering Part 1
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
Lecture1 pattern recognition............
Data_Analytics_and_PowerBI_Presentation.pptx
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
Quality review (1)_presentation of this 21
Mega Projects Data Mega Projects Data
Computer network topology notes for revision

Istio by Example (extended version)

  • 2. Why? Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 4. Atomic Architecture Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 12. Setting the sails with Istio Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 13. Features Traffic Management Resiliency Security Observability Request Routing Timeouts mTLS Metrics Load Balancing Circuit Breaker Access Control Logs Traffic Shifting Health Checks (active, passive) Workload Identity Traces Traffic Mirroring Retries RBAC Service Discovery Rate Limiting Ingress, Egress Delay & Fault Injection Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 15. Deploy Istio & Sample App curl -L https://git.io/getLatestIstio | sh - cd istio-* export PATH=$PWD/bin:$PATH # deploy istio with mTLS enabled by default kubectl apply -f install/kubernetes/istio-auth.yaml # ... lengthy copy & paste code to deploy sidecar auto-deployment # label default namespace to be auto-sidecarred kubectl label namespace default istio-injection=enabled # deploy and open sample application kubectl apply -f istio-*/samples/bookinfo/kube/bookinfo.yaml open http://localhost/productpage Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 16. Ingress apiVersion: extensions/v1beta1 kind: Ingress metadata: name: gateway annotations: kubernetes.io/ingress.class: "istio" spec: rules: - http: paths: - path: /productpage backend: serviceName: productpage servicePort: 9080 - path: /login backend: serviceName: productpage servicePort: 9080 - path: /logout backend: serviceName: productpage servicePort: 9080 - path: /api/v1/products.* backend: serviceName: productpage servicePort: 9080
  • 17. Sample Application: BookInfo1 1 Istio BookInfo Sample (https://istio.io/docs/guides/bookinfo.html)
  • 18. Deploy Observability Add-Ons #Prometheus kubectl apply -f istio-*/install/kubernetes/addons/prometheus.yaml kubectl expose deployment prometheus --name=prometheus-expose --port=9090 --target-port=9090 --type=LoadBalancer -n=istio-system #Grafana kubectl apply -f istio-*/install/kubernetes/addons/grafana.yaml kubectl expose deployment grafana --name=grafana-expose --port=3000 --target-port=3000 --type=LoadBalancer -n=istio-system #Jaeger kubectl apply -n istio-system -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/ master/all-in-one/jaeger-all-in-one-template.yml kubectl expose deployment jaeger-deployment --name=jaeger-expose --port=16686 --target-port=16686 --type=LoadBalancer -n=istio-system #EFK kubectl apply -f logging-stack.yaml kubectl expose deployment kibana --name=kibana-expose --port=5601 --target-port=5601 --type=LoadBalancer -n=logging Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 19. Observe Services # Logs istioctl create -f fluentd-istio.yaml # Metrics istioctl create -f telemetry.yaml Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 21. Canary Releases: A/B Testing apiVersion: config.istio.io/v1alpha2 kind: RouteRule metadata: name: reviews-test-v2 spec: destination: name: reviews precedence: 2 match: request: headers: cookie: regex: "^(.*?;)?(user=jason)(;.*)?$" route: - labels: version: v2 istioctl create -f route-rule-reviews-test-v2.yaml Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 22. Canary Releases: Rolling Upgrade apiVersion: config.istio.io/v1alpha2 kind: RouteRule metadata: name: reviews-default spec: destination: name: reviews precedence: 1 route: - labels: version: v1 weight: 50 - labels: version: v3 weight: 50 istioctl create -f route-rule-reviews-50-v3.yaml Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 23. Canary Releases: Blue/Green apiVersion: config.istio.io/v1alpha2 kind: RouteRule metadata: name: reviews-default spec: destination: name: reviews precedence: 1 route: - labels: version: v3 weight: 100 istioctl replace -f route-rule-reviews-v3.yaml Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 24. Security: Access Control apiVersion: "config.istio.io/v1alpha2" kind: denier metadata: name: denyreviewsv3handler spec: status: code: 7 message: Not allowed --- apiVersion: "config.istio.io/v1alpha2" kind: checknothing metadata: name: denyreviewsv3request spec: --- apiVersion: "config.istio.io/v1alpha2" kind: rule metadata: name: denyreviewsv3 spec: match: source.labels["layer"]=="inner" && destination.labels["layer"] == "outer" actions: - handler: denyreviewsv3handler.denier instances: [ denyreviewsv3request.checknothing ] Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 25. Security: Egress apiVersion: networking.istio.io/v1alpha3 kind: ExternalService metadata: name: google-ext spec: hosts: - www.google.com ports: - number: 443 name: https protocol: http --- apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: google-ext spec: name: www.google.com trafficPolicy: tls: mode: SIMPLE # initiates HTTPS when talking to www.google.com Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018
  • 26. Resiliency: Circuit Breaker apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: httpbin spec: name: httpbin trafficPolicy: connectionPool: tcp: maxConnections: 100 http: http1MaxPendingRequests: 1 maxRequestsPerConnection: 1 outlierDetection: http: consecutiveErrors: 1 interval: 1s baseEjectionTime: 3m maxEjectionPercent: 100 Istio by Example, @adersberger, KubeCon & CloudNativeCon EU 2018