SlideShare a Scribd company logo
ISTIO
NIKLAUS HIRT (DEVOPS / CLOUD ARCHITECT)
AGENDA
1. Microservices
2. Istio
3. Demo
MICROSERVICES
▸Decomposing an application into single function modules
which are independently deployed and operated
▸Accelerate delivery by minimizing communication and
coordination between people
ARCHITECTURE
THE TRADE OFF
Improved delivery
velocity in exchange for
increased operational
complexity
Hailo microservices
MICROSERVICES ARE HARD
▸Applications aren’t running in green-field environments
▸Network layer is hard to manage
▸Tooling is nascent
CHALLENGES
COMMON DEVOPS CHALLENGE 1
▸How do I roll out a newer version of my microservice
without down time?
▸How do I ensure traffic continue to go to the current
version before the newer version is tested and ready?
COMMON DEVOPS CHALLENGE 2
▸How do I do canary testing?
▸I want to leverage crowdsourced testing. How do I test the
new version with a subset of users?
▸How do I proceed to a full rollout after satisfactory testing
of the new version?
COMMON DEVOPS CHALLENGE 3
▸How do I do A/B testing?
• Release a new version to a subset of users in a precise
way
▸I have launched B in the dark, but how can I keep B to
myself or a small testing group?
OTHER COMMON DEVOPS CHALLENGES
4. Things don’t always go correctly in production... How do I
inject fault to my microservices to prepare myself?
5. My services can only handle certain rate, how can I limit
rate for some of my services?
6. I need to view and monitor what is going on with each of
my services when crisis arises.
7. How can I secure my services .
It’s doable, but…
It’s doable, but…
Requires a lot of coding
Service Mesh
Dedicated infrastructure layer
to make
service-to-service communication
fast, safe and reliable
ISTIO
A service mesh designed to
connect, manage and secure micro services
ISTIO
Launched in May 2017
by Google, Lyft and IBM
A service mesh designed to
connect, manage and secure micro services
ISTIO
Open Source
Launched in May 2017
by Google, Lyft and IBM
A service mesh designed to
connect, manage and secure micro services
ISTIO
Open Source
Zero Code Changes
Launched in May 2017
by Google, Lyft and IBM
A service mesh designed to
connect, manage and secure micro services
FEATURES
INTELLIGENT ROUTING AND LOAD BALANCING
‣ Conduct traffic between services
with dynamic route configuration
‣ A/B tests
‣ Canary releases
‣ Gradually upgrade versions
Red/Black deployments
RESILIENCE ACROSS LANGUAGES AND PLATFORMS
‣ Increase reliability by shielding
applications from flaky networks
and cascading failures in adverse
conditions
FLEET-WIDE POLICY ENFORCEMENT
‣ Apply organizational policy to the
interaction between services
‣ Ensure access policies are
enforced
‣ Make sure resources are fairly
distributed among consumers.
IN-DEPTH TELEMETRY AND REPORTING
‣ Understand the dependencies
between services, the nature and
flow of traffic between them, and
quickly identify issues with
distributed tracing.
ARCHITECTURE
ARCHITECTURE
COMPONENTS OF ISTIO
‣ Envoy
proxy, to mediate all inbound and outbound traffic for all
services in the service mesh.
‣ Pilot
Programming envoys and responsible for service discovery,
registration and load balancing
‣ Citadel
provides strong service-to-service and end-user authentication
using mutual TLS, with built-in identity and credential
management
‣ Mixer
Responsible for enforcing access control and usage policies and
collecting telemetry data
ISTIO
▸Operates at Layer 7 , which is the “service” or “RPC” layer
of your network application
▸A rich set of attributes to base policy decisions on, so
policies can be applied based on virtual host, URL, or
other HTTP headers
▸Flexibility in processing
▸Allows it to be distributed
▸Istio Proxy is implemented inside the pod, as a Envoy
sidecar container in the same network namespace
ISTIO – CUSTOM RESOURCE DEFINITIONS
kind: Gateway
metadata:
name: helloworld-gateway
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*'
port:
name: http
number: 80
protocol: HTTP
kind: DestinationRule
metadata:
name: helloworld-destination
spec:
host: helloworld
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
kind: VirtualService
metadata:
name: helloworld
spec:
hosts:
- "*"
gateways:
- helloworld-gateway
http:
- match:
- uri:
exact: /hello
route:
- destination:
host: helloworld
subset: v1
weight: 90
- destination:
host: helloworld
subset: v2
weight: 10
POD
HelloWorld
version = v1
POD
HelloWorld
version = v2
TRAFFIC CONTROL
CHALLENGE 1
ROLL OUT NEW VERSION WITHOUT DOWNTIME OR CHANGING CODE
version: v2.0
env: us-prod
version: v1.5
env: us-prod
100%
0%
// A simple traffic control rule
destination:
serviceB.example.cluster.local
match:
source:
serviceA.example.cluster.local
route:
- labels:
version: v1.5
env: us-prod
weight: 100
TRAFFIC CONTROL
CHALLENGE 1
ROLL OUT NEW VERSION WITHOUT DOWNTIME OR CHANGING CODE
version: v2.0
env: us-prod
version: v1.5
env: us-prod
0%
0%100%
// A simple traffic control rule
destination:
serviceB.example.cluster.local
match:
source:
serviceA.example.cluster.local
route:
- labels:
version: v2.0
env: us-prod
weight: 100
TRAFFIC SPLITTING
CHALLENGE 2
HOW TO DO CANARY TESTING
version: v2.0-alpha
env: us-staging
version: v1.5
env: us-prod
// A simple traffic splitting rule
destination:
serviceB.example.cluster.local
match:
source:
serviceA.example.cluster.local
route:
- labels:
version: v1.5
env: us-prod
weight: 95
- labels:
version: v2.0-alpha
env: us-staging
weight: 5
TRAFFIC STEERNIG
CHALLENGE 3
HOW TO DO A/B TESTING
version: v2
version: v1
version: v2
version: v1
// Content-based traffic steering
destination:
serviceB.example.cluster.local
match:
httpHeaders:
user-agent:
regex: ^(.*?;)?(iPhone)(;.*)?$
precedence: 2
route:
- labels:
version: v2
TRAFFIC MIRRORING
version: v2.0-alpha
env: us-staging
version: v1.5
env: us-prod100%
100%
•Responses to any mirrored traffic is ignored; traffic is mirrored as “fire-and-forget”
•You’ll need to have the 0-weighted route to hint to Istio to create the proper Envoy
// A simple traffic splitting rule
destination:
serviceB.example.cluster.local
match:
source:
serviceA.example.cluster.local
route:
- labels:
version: v1.5
env: us-prod
weight: 100
- labels:
version: v2.0-alpha
env: us-staging
weight: 0
mirror:
name: httpbin
labels:
version: v2.0-alpha
env: us-staging
CHALLENGE 4
THINGS DON’T ALWAYS GO CORRECTLY IN PRODUCTION...
RESILIENCY
CHALLENGE 4
THINGS DON’T ALWAYS GO CORRECTLY IN PRODUCTION...
RESILIENCY
CHALLENGE 4
THINGS DON’T ALWAYS GO CORRECTLY IN PRODUCTION...
RESILIENCY TESTING
hosts:
- ratings
http:
- fault:
abort:
percent: 10
httpStatus: 400
route:
- destination:
host: ratings
subset: v1
hosts:
- ratings
http:
- fault:
delay:
percent: 10
fixedDelay: 5s
route:
- destination:
host: ratings
subset: v1
CHALLENGE 4
HOW DO I INJECT FAULT TO MY MICROSERVICES TO PREPARE MYSELF?
RATE LIMITING
CHALLENGE 5
HOW CAN I LIMIT RATE FOR SOME OF MY SERVICES?
TELEMETRY
‣ Monitoring & tracing should
not be an afterthought in the
infrastructure
‣ Goals
‣ Metrics without instrumenting apps
‣ Consistent metrics across fleet
‣ Trace flow of requests across
services
‣ Portable across metric backend
providers
CHALLENGE 6
I NEED TO VIEW WHAT IS GOING ON WHEN CRISIS ARISES
SECURITY
CHALLENGE 7
HOW CAN I SECURE MY SERVICES?
‣ Authentication
‣ Transport authentication, also
known as service-to-service
authentication
‣ Origin authentication, also
known as end-user
authentication
‣ Authorization
‣ Based on RBAC
‣ Namespace-level, service-level
and method-level access control
for services
USING ISTIO IN CONCERT WITH CALICO
▸ Policy operates at Layer 7 , which is the
“service” or “RPC” layer of your network
application.
▸ A rich set of attributes to base policy
decisions on, so policies can be applied
based on virtual host, URL, or other HTTP
headers.
▸ Flexibility in processing.
▸ Allows it to be distributed
▸ Istio Proxy is implemented inside the pod, as
a Envoy sidecar container in the same
network namespace.
▸ Operates at Layer 3, which is the network
layer
▸ Has the advantage of being universal (DNS,
SQL, real-time streaming, …)
▸ Can extend beyond the service mesh
(including to bare metal or VM endpoints not
under the control of Kubernetes).
▸ Calico’s policy is enforced at the host node,
outside the network namespace of the guest
pods.
▸ Based on iptables, which are packet filters
implemented in the standard Linux kernel, it
is extremely fast.
USING ISTIO IN CONCERT WITH CALICO
“RPC” — L7 Layer “Network” — L3-4
Userspace Implementation Kernel
Pod Enforcement Point Node
Ideal for applying policy in support of
operational goals, like service routing,
retries, circuit-breaking, etc
Strengths
Universal, highly efficient, and
isolated from the pods, making it ideal
for applying policy in support of
security goals
ADDRESSING DEVOPS CHALLENGES
# CHALLENGE ISTIO SOLUTION
CHALLENGE 1 ROLL OUT NEW VERSION WITHOUT DOWNTIME
OR CHANGING CODE TRAFFIC CONTROL
CHALLENGE 2 HOW TO DO CANARY TESTING TRAFFIC SPLITTING
CHALLENGE 3 HOW TO DO A/B TESTING TRAFFIC STEERNIG
CHALLENGE 4 THINGS DON’T ALWAYS GO CORRECTLY IN
PRODUCTION...
TRAFFIC MIRRORING
RESILIENCY
RESILIENCY TESTING
CHALLENGE5 HOW CAN I LIMIT RATE FOR SOME OF MY
SERVICES? RATE LIMITING
CHALLENGE 6 I NEED TO VIEW AND MONITOR WHAT IS GOING ON
WHEN CRISIS ARISES
TELEMETRY
CHALLENGE 7 HOW CAN I SECURE MY SERVICES? AUTHENTICATION
AUTHORIZATION
CALICO
GETTING STARTED
‣ Go to https://istio.io/
‣ Download ISTIO Release
With Kubectl
$ kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
$ kubectl apply -f install/kubernetes/istio-demo.yaml
With HELM Templating
$ kubectl create namespace istio-system
$ helm template --name istio
--namespace istio-system
--set grafana.enabled=true
--set servicegraph.enabled=true
--set kiali.enabled=true > istio.yaml
$ kubectl apply -f istio.yaml
GETTING STARTED
‣ IBMs ISTIO 101 Hands On
‣ Go to https://github.com/IBM/istio101
COMMUNITY PARTNERS
‣ Vmware
‣ RedHat
‣ Microsoft
‣ Tigera
‣ Cisco
‣ Pivotal
‣ Weave works
‣ Datawire
‣ Scytale (SPIFEE)
‣ And more…
USEFUL LINKS
‣ Web istio.io
‣ Twitter: @Istiomesh
‣ Istio 101: https://github.com/IBM/istio101
‣ Traffic management using Istio: https://ibm.co/2F7xSnf
‣ Resiliency and fault-tolerance using Istio: https://bit.ly/2qStF2B
‣ Reliable application roll out and operations using Istio:
https://bit.ly/2K9IRQX
SOME DOCS
IBM Cloud Private
for Dummies
http://ibm.biz/BdZedY
Cloud Adoption and
Transformation Consultancy
http://ibm.biz/BdYFCx
The de facto guide to improving your
enterprise with the cloud, created
by distinguished members of our
Solution Engineering team
http://ibm.biz/playbook
Deploying and Operating Production
Applications on Kubernetes in Hybrid
Cloud Environments
http://ibm.biz/k8sintheenterprise
CONTACT ME
Niklaus Hirt: nikh@ch.ibm.com
DEMO
DEMO – BOOKINFO APP
The Bookinfo application is broken into four separate microservices:
• productpage. The productpage microservice calls the details and reviews microservices to populate the page.
• details. The details microservice contains book information.
• reviews. The reviews microservice contains book reviews. It also calls the ratings microservice.
• ratings. The ratings microservice contains book ranking information that accompanies a book review.
There are 3 versions of the reviews microservice:
• Version v1 doesn’t call the ratings service.
• Version v2 calls the ratings service, and displays each rating as 1 to 5 black stars.
• Version v3 calls the ratings service, and displays each rating as 1 to 5 red stars.
THANK YOU!

More Related Content

PDF
Devops - Microservice and Kubernetes
PDF
Putting microservices on a diet with Istio
PDF
Sailing into 2018 with Kubernetes and Istio
PDF
A sail in the cloud
PDF
Microservices, Kubernetes and Istio - A Great Fit!
PPTX
Comprehensive container based service monitoring with kubernetes and istio
PDF
Istio Triangle Kubernetes Meetup Aug 2019
PDF
From zero to hero with Kubernetes and Istio
Devops - Microservice and Kubernetes
Putting microservices on a diet with Istio
Sailing into 2018 with Kubernetes and Istio
A sail in the cloud
Microservices, Kubernetes and Istio - A Great Fit!
Comprehensive container based service monitoring with kubernetes and istio
Istio Triangle Kubernetes Meetup Aug 2019
From zero to hero with Kubernetes and Istio

What's hot (20)

PPTX
An Open-Source Platform to Connect, Manage, and Secure Microservices
PDF
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
PDF
Istio By Example (extended version)
PDF
Istio presentation jhug
PPTX
Spring Boot on Kubernetes/OpenShift
PPTX
From 0 to 60 with kubernetes and istio
PDF
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
PDF
How to build an event-driven, polyglot serverless microservices framework on ...
PDF
Kubernetes Multi-cluster without Federation - Kubecon EU 2018
PPTX
Istio canaries and kubernetes
PDF
Mastering Microservices with Kong (CodeMotion 2019)
PDF
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
PDF
A microservice architecture based on golang
PDF
Zero-downtime deployment of Micro-services with Kubernetes
PPTX
Microservices and Best Practices
PDF
Spring Cloud Into Production
PPTX
Ofir Makmal - Intro To Kubernetes Operators - Google Cloud Summit 2018 Tel Aviv
PDF
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
PPTX
Containerizing a REST API and Deploying to Kubernetes
PDF
在 LINE 私有雲中使用 Managed Kubernetes
An Open-Source Platform to Connect, Manage, and Secure Microservices
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Istio By Example (extended version)
Istio presentation jhug
Spring Boot on Kubernetes/OpenShift
From 0 to 60 with kubernetes and istio
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
How to build an event-driven, polyglot serverless microservices framework on ...
Kubernetes Multi-cluster without Federation - Kubecon EU 2018
Istio canaries and kubernetes
Mastering Microservices with Kong (CodeMotion 2019)
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
A microservice architecture based on golang
Zero-downtime deployment of Micro-services with Kubernetes
Microservices and Best Practices
Spring Cloud Into Production
Ofir Makmal - Intro To Kubernetes Operators - Google Cloud Summit 2018 Tel Aviv
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
Containerizing a REST API and Deploying to Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes
Ad

Similar to 21st Docker Switzerland Meetup - ISTIO (20)

PPTX
ISTIO Deep Dive
PDF
Managing microservices with Istio Service Mesh
PDF
Application Rollout - Istio
PDF
Managing Microservices With The Istio Service Mesh on Kubernetes
PDF
Hello istio
PDF
Securing Microservices with Istio
PDF
Introduction to Istio Service Mesh
PPTX
Microservices With Istio Service Mesh
PDF
Putting Microservices on a Diet: with Istio!
PDF
Service Mesh For Beginner
PDF
Istio: Using nginMesh as the service proxy
PPTX
istio: service mesh for all
PDF
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
PDF
Stop reinventing the wheel with Istio by Mete Atamel (Google)
PDF
Istio in Action 1st Edition Christian E. Posta
PDF
How to Make Istio Work with Your App
PDF
How to Make Istio Work with Your App
PDF
PPTX
Service Meshes with Istio
PPTX
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
ISTIO Deep Dive
Managing microservices with Istio Service Mesh
Application Rollout - Istio
Managing Microservices With The Istio Service Mesh on Kubernetes
Hello istio
Securing Microservices with Istio
Introduction to Istio Service Mesh
Microservices With Istio Service Mesh
Putting Microservices on a Diet: with Istio!
Service Mesh For Beginner
Istio: Using nginMesh as the service proxy
istio: service mesh for all
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Stop reinventing the wheel with Istio by Mete Atamel (Google)
Istio in Action 1st Edition Christian E. Posta
How to Make Istio Work with Your App
How to Make Istio Work with Your App
Service Meshes with Istio
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
A Presentation on Artificial Intelligence
PDF
KodekX | Application Modernization Development
PDF
Approach and Philosophy of On baking technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation theory and applications.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
Teaching material agriculture food technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25 Week I
A Presentation on Artificial Intelligence
KodekX | Application Modernization Development
Approach and Philosophy of On baking technology
The AUB Centre for AI in Media Proposal.docx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
MYSQL Presentation for SQL database connectivity
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
Encapsulation theory and applications.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Teaching material agriculture food technology
“AI and Expert System Decision Support & Business Intelligence Systems”

21st Docker Switzerland Meetup - ISTIO

  • 1. ISTIO NIKLAUS HIRT (DEVOPS / CLOUD ARCHITECT)
  • 3. MICROSERVICES ▸Decomposing an application into single function modules which are independently deployed and operated ▸Accelerate delivery by minimizing communication and coordination between people
  • 5. THE TRADE OFF Improved delivery velocity in exchange for increased operational complexity Hailo microservices
  • 6. MICROSERVICES ARE HARD ▸Applications aren’t running in green-field environments ▸Network layer is hard to manage ▸Tooling is nascent
  • 8. COMMON DEVOPS CHALLENGE 1 ▸How do I roll out a newer version of my microservice without down time? ▸How do I ensure traffic continue to go to the current version before the newer version is tested and ready?
  • 9. COMMON DEVOPS CHALLENGE 2 ▸How do I do canary testing? ▸I want to leverage crowdsourced testing. How do I test the new version with a subset of users? ▸How do I proceed to a full rollout after satisfactory testing of the new version?
  • 10. COMMON DEVOPS CHALLENGE 3 ▸How do I do A/B testing? • Release a new version to a subset of users in a precise way ▸I have launched B in the dark, but how can I keep B to myself or a small testing group?
  • 11. OTHER COMMON DEVOPS CHALLENGES 4. Things don’t always go correctly in production... How do I inject fault to my microservices to prepare myself? 5. My services can only handle certain rate, how can I limit rate for some of my services? 6. I need to view and monitor what is going on with each of my services when crisis arises. 7. How can I secure my services .
  • 14. Service Mesh Dedicated infrastructure layer to make service-to-service communication fast, safe and reliable
  • 15. ISTIO A service mesh designed to connect, manage and secure micro services
  • 16. ISTIO Launched in May 2017 by Google, Lyft and IBM A service mesh designed to connect, manage and secure micro services
  • 17. ISTIO Open Source Launched in May 2017 by Google, Lyft and IBM A service mesh designed to connect, manage and secure micro services
  • 18. ISTIO Open Source Zero Code Changes Launched in May 2017 by Google, Lyft and IBM A service mesh designed to connect, manage and secure micro services
  • 20. INTELLIGENT ROUTING AND LOAD BALANCING ‣ Conduct traffic between services with dynamic route configuration ‣ A/B tests ‣ Canary releases ‣ Gradually upgrade versions Red/Black deployments
  • 21. RESILIENCE ACROSS LANGUAGES AND PLATFORMS ‣ Increase reliability by shielding applications from flaky networks and cascading failures in adverse conditions
  • 22. FLEET-WIDE POLICY ENFORCEMENT ‣ Apply organizational policy to the interaction between services ‣ Ensure access policies are enforced ‣ Make sure resources are fairly distributed among consumers.
  • 23. IN-DEPTH TELEMETRY AND REPORTING ‣ Understand the dependencies between services, the nature and flow of traffic between them, and quickly identify issues with distributed tracing.
  • 26. COMPONENTS OF ISTIO ‣ Envoy proxy, to mediate all inbound and outbound traffic for all services in the service mesh. ‣ Pilot Programming envoys and responsible for service discovery, registration and load balancing ‣ Citadel provides strong service-to-service and end-user authentication using mutual TLS, with built-in identity and credential management ‣ Mixer Responsible for enforcing access control and usage policies and collecting telemetry data
  • 27. ISTIO ▸Operates at Layer 7 , which is the “service” or “RPC” layer of your network application ▸A rich set of attributes to base policy decisions on, so policies can be applied based on virtual host, URL, or other HTTP headers ▸Flexibility in processing ▸Allows it to be distributed ▸Istio Proxy is implemented inside the pod, as a Envoy sidecar container in the same network namespace
  • 28. ISTIO – CUSTOM RESOURCE DEFINITIONS kind: Gateway metadata: name: helloworld-gateway spec: selector: istio: ingressgateway servers: - hosts: - '*' port: name: http number: 80 protocol: HTTP kind: DestinationRule metadata: name: helloworld-destination spec: host: helloworld subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2 kind: VirtualService metadata: name: helloworld spec: hosts: - "*" gateways: - helloworld-gateway http: - match: - uri: exact: /hello route: - destination: host: helloworld subset: v1 weight: 90 - destination: host: helloworld subset: v2 weight: 10 POD HelloWorld version = v1 POD HelloWorld version = v2
  • 29. TRAFFIC CONTROL CHALLENGE 1 ROLL OUT NEW VERSION WITHOUT DOWNTIME OR CHANGING CODE version: v2.0 env: us-prod version: v1.5 env: us-prod 100% 0% // A simple traffic control rule destination: serviceB.example.cluster.local match: source: serviceA.example.cluster.local route: - labels: version: v1.5 env: us-prod weight: 100
  • 30. TRAFFIC CONTROL CHALLENGE 1 ROLL OUT NEW VERSION WITHOUT DOWNTIME OR CHANGING CODE version: v2.0 env: us-prod version: v1.5 env: us-prod 0% 0%100% // A simple traffic control rule destination: serviceB.example.cluster.local match: source: serviceA.example.cluster.local route: - labels: version: v2.0 env: us-prod weight: 100
  • 31. TRAFFIC SPLITTING CHALLENGE 2 HOW TO DO CANARY TESTING version: v2.0-alpha env: us-staging version: v1.5 env: us-prod // A simple traffic splitting rule destination: serviceB.example.cluster.local match: source: serviceA.example.cluster.local route: - labels: version: v1.5 env: us-prod weight: 95 - labels: version: v2.0-alpha env: us-staging weight: 5
  • 32. TRAFFIC STEERNIG CHALLENGE 3 HOW TO DO A/B TESTING version: v2 version: v1 version: v2 version: v1 // Content-based traffic steering destination: serviceB.example.cluster.local match: httpHeaders: user-agent: regex: ^(.*?;)?(iPhone)(;.*)?$ precedence: 2 route: - labels: version: v2
  • 33. TRAFFIC MIRRORING version: v2.0-alpha env: us-staging version: v1.5 env: us-prod100% 100% •Responses to any mirrored traffic is ignored; traffic is mirrored as “fire-and-forget” •You’ll need to have the 0-weighted route to hint to Istio to create the proper Envoy // A simple traffic splitting rule destination: serviceB.example.cluster.local match: source: serviceA.example.cluster.local route: - labels: version: v1.5 env: us-prod weight: 100 - labels: version: v2.0-alpha env: us-staging weight: 0 mirror: name: httpbin labels: version: v2.0-alpha env: us-staging CHALLENGE 4 THINGS DON’T ALWAYS GO CORRECTLY IN PRODUCTION...
  • 34. RESILIENCY CHALLENGE 4 THINGS DON’T ALWAYS GO CORRECTLY IN PRODUCTION...
  • 35. RESILIENCY CHALLENGE 4 THINGS DON’T ALWAYS GO CORRECTLY IN PRODUCTION...
  • 36. RESILIENCY TESTING hosts: - ratings http: - fault: abort: percent: 10 httpStatus: 400 route: - destination: host: ratings subset: v1 hosts: - ratings http: - fault: delay: percent: 10 fixedDelay: 5s route: - destination: host: ratings subset: v1 CHALLENGE 4 HOW DO I INJECT FAULT TO MY MICROSERVICES TO PREPARE MYSELF?
  • 37. RATE LIMITING CHALLENGE 5 HOW CAN I LIMIT RATE FOR SOME OF MY SERVICES?
  • 38. TELEMETRY ‣ Monitoring & tracing should not be an afterthought in the infrastructure ‣ Goals ‣ Metrics without instrumenting apps ‣ Consistent metrics across fleet ‣ Trace flow of requests across services ‣ Portable across metric backend providers CHALLENGE 6 I NEED TO VIEW WHAT IS GOING ON WHEN CRISIS ARISES
  • 39. SECURITY CHALLENGE 7 HOW CAN I SECURE MY SERVICES? ‣ Authentication ‣ Transport authentication, also known as service-to-service authentication ‣ Origin authentication, also known as end-user authentication ‣ Authorization ‣ Based on RBAC ‣ Namespace-level, service-level and method-level access control for services
  • 40. USING ISTIO IN CONCERT WITH CALICO ▸ Policy operates at Layer 7 , which is the “service” or “RPC” layer of your network application. ▸ A rich set of attributes to base policy decisions on, so policies can be applied based on virtual host, URL, or other HTTP headers. ▸ Flexibility in processing. ▸ Allows it to be distributed ▸ Istio Proxy is implemented inside the pod, as a Envoy sidecar container in the same network namespace. ▸ Operates at Layer 3, which is the network layer ▸ Has the advantage of being universal (DNS, SQL, real-time streaming, …) ▸ Can extend beyond the service mesh (including to bare metal or VM endpoints not under the control of Kubernetes). ▸ Calico’s policy is enforced at the host node, outside the network namespace of the guest pods. ▸ Based on iptables, which are packet filters implemented in the standard Linux kernel, it is extremely fast.
  • 41. USING ISTIO IN CONCERT WITH CALICO “RPC” — L7 Layer “Network” — L3-4 Userspace Implementation Kernel Pod Enforcement Point Node Ideal for applying policy in support of operational goals, like service routing, retries, circuit-breaking, etc Strengths Universal, highly efficient, and isolated from the pods, making it ideal for applying policy in support of security goals
  • 42. ADDRESSING DEVOPS CHALLENGES # CHALLENGE ISTIO SOLUTION CHALLENGE 1 ROLL OUT NEW VERSION WITHOUT DOWNTIME OR CHANGING CODE TRAFFIC CONTROL CHALLENGE 2 HOW TO DO CANARY TESTING TRAFFIC SPLITTING CHALLENGE 3 HOW TO DO A/B TESTING TRAFFIC STEERNIG CHALLENGE 4 THINGS DON’T ALWAYS GO CORRECTLY IN PRODUCTION... TRAFFIC MIRRORING RESILIENCY RESILIENCY TESTING CHALLENGE5 HOW CAN I LIMIT RATE FOR SOME OF MY SERVICES? RATE LIMITING CHALLENGE 6 I NEED TO VIEW AND MONITOR WHAT IS GOING ON WHEN CRISIS ARISES TELEMETRY CHALLENGE 7 HOW CAN I SECURE MY SERVICES? AUTHENTICATION AUTHORIZATION CALICO
  • 43. GETTING STARTED ‣ Go to https://istio.io/ ‣ Download ISTIO Release With Kubectl $ kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml $ kubectl apply -f install/kubernetes/istio-demo.yaml With HELM Templating $ kubectl create namespace istio-system $ helm template --name istio --namespace istio-system --set grafana.enabled=true --set servicegraph.enabled=true --set kiali.enabled=true > istio.yaml $ kubectl apply -f istio.yaml
  • 44. GETTING STARTED ‣ IBMs ISTIO 101 Hands On ‣ Go to https://github.com/IBM/istio101
  • 45. COMMUNITY PARTNERS ‣ Vmware ‣ RedHat ‣ Microsoft ‣ Tigera ‣ Cisco ‣ Pivotal ‣ Weave works ‣ Datawire ‣ Scytale (SPIFEE) ‣ And more…
  • 46. USEFUL LINKS ‣ Web istio.io ‣ Twitter: @Istiomesh ‣ Istio 101: https://github.com/IBM/istio101 ‣ Traffic management using Istio: https://ibm.co/2F7xSnf ‣ Resiliency and fault-tolerance using Istio: https://bit.ly/2qStF2B ‣ Reliable application roll out and operations using Istio: https://bit.ly/2K9IRQX
  • 47. SOME DOCS IBM Cloud Private for Dummies http://ibm.biz/BdZedY Cloud Adoption and Transformation Consultancy http://ibm.biz/BdYFCx The de facto guide to improving your enterprise with the cloud, created by distinguished members of our Solution Engineering team http://ibm.biz/playbook Deploying and Operating Production Applications on Kubernetes in Hybrid Cloud Environments http://ibm.biz/k8sintheenterprise
  • 48. CONTACT ME Niklaus Hirt: nikh@ch.ibm.com
  • 49. DEMO
  • 50. DEMO – BOOKINFO APP The Bookinfo application is broken into four separate microservices: • productpage. The productpage microservice calls the details and reviews microservices to populate the page. • details. The details microservice contains book information. • reviews. The reviews microservice contains book reviews. It also calls the ratings microservice. • ratings. The ratings microservice contains book ranking information that accompanies a book review. There are 3 versions of the reviews microservice: • Version v1 doesn’t call the ratings service. • Version v2 calls the ratings service, and displays each rating as 1 to 5 black stars. • Version v3 calls the ratings service, and displays each rating as 1 to 5 red stars.