Slide 1

Slide 1 text

Sveiki Lithuania

Slide 2

Slide 2 text

Questions @ sli.do

Slide 3

Slide 3 text

Easy microservices in the cloud with Kubernetes & Istio

Slide 4

Slide 4 text

Sendil Kumar @sendilkumarn

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Senior Software Engineer @uber

Slide 8

Slide 8 text

Passionate about Open Source Senior Software Engineer @uber

Slide 9

Slide 9 text

Passionate about Open Source Senior Software Engineer @uber Team member @JHipster

Slide 10

Slide 10 text

Passionate about Open Source Senior Software Engineer @uber Team member @JHipster Crafting @KHipster

Slide 11

Slide 11 text

Agenda K8s Istio JHipster Microservices JHipster Microservices K8s & Istio

Slide 12

Slide 12 text

Docker

Slide 13

Slide 13 text

Docker Self Contained images

Slide 14

Slide 14 text

Docker Self Contained images Portability

Slide 15

Slide 15 text

Docker Managing the infrastructure

Slide 16

Slide 16 text

Docker Managing the infrastructure Deciding when and how to run the applications

Slide 17

Slide 17 text

Kubernetes

Slide 18

Slide 18 text

Kubernetes De-coupled infrastructure completely

Slide 19

Slide 19 text

K8s is an open-source system

Slide 20

Slide 20 text

K8s is an open-source system that automates deployment containerised applications

Slide 21

Slide 21 text

K8s is an open-source system that automates deployment scales (up/down/in/out) Containerised applications

Slide 22

Slide 22 text

K8s is an open-source system that automates deployment scales (up/down/in/out) manages Containerised applications

Slide 23

Slide 23 text

K8s makes it easy and simple

Slide 24

Slide 24 text

But K8s itself is not simple

Slide 25

Slide 25 text

How Kubernetes works?

Slide 26

Slide 26 text

Cluster mode

Slide 27

Slide 27 text

Kubernetes Master Nodes Nodes Nodes

Slide 28

Slide 28 text

kubectl apply -f some.yml Api Server etcd Scheduler Controller create yaml file connects via CLI adds to the queue stores sends to the controller Kubernetes Land

Slide 29

Slide 29 text

Api Server etcd Scheduler Controller Kubernetes Land Control Plane

Slide 30

Slide 30 text

Worker Node signals to start the deployment Kubelet Kubelet Kubelet Worker Node Kubelet Kubelet Kubelet Worker Node Kubelet Kubelet Kubelet Scheduler

Slide 31

Slide 31 text

handles networking Worker Node Kubelet Kube proxy Kubelet Kube proxy Kubelet Kube proxy Kubelet Kube proxy

Slide 32

Slide 32 text

K8s states the (desired) running state of application

Slide 33

Slide 33 text

Microservices

Slide 34

Slide 34 text

more freedom to react Microservices

Slide 35

Slide 35 text

respond faster Microservices

Slide 36

Slide 36 text

Technology Heterogeneity

Slide 37

Slide 37 text

Fault isolation

Slide 38

Slide 38 text

Granular Scaling

Slide 39

Slide 39 text

❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌

Slide 40

Slide 40 text

Don’t violate DRY inside microservice.

Slide 41

Slide 41 text

Microservices with JHipster

Slide 42

Slide 42 text

API Gateway BFF Pattern

Slide 43

Slide 43 text

How does JHipster app looks like?

Slide 44

Slide 44 text

Java / Kotlin backend Zuul UAA

Slide 45

Slide 45 text

Java / Kotlin backend Zuul UAA Microservices Gateway

Slide 46

Slide 46 text

Service Registry

Slide 47

Slide 47 text

JHipster Registry Consul

Slide 48

Slide 48 text

JHipster Registry Consul Eureka + Spring Cloud Config Admin Server Easier in multi-node cluster Availability over consistency Consistency over Availability - All nodes provide correct detail every time

Slide 49

Slide 49 text

Consoles

Slide 50

Slide 50 text

Elasticsearch Logstash Kibana JHipster Console

Slide 51

Slide 51 text

Consul / JHipster Registry Console Microservices Gateway Microservices

Slide 52

Slide 52 text

We will generate…

Slide 53

Slide 53 text

Store Gateway Notification Invoice Product

Slide 54

Slide 54 text

JHipster demo time

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

Harder to control

Slide 57

Slide 57 text

Harder to Manage

Slide 58

Slide 58 text

Harder to Secure

Slide 59

Slide 59 text

Service A Service B Service C

Slide 60

Slide 60 text

Service A Service B Service C Logging Monitoring Networking

Slide 61

Slide 61 text

Service A Service B Service C Common Services…

Slide 62

Slide 62 text

Istio

Slide 63

Slide 63 text

Service mesh

Slide 64

Slide 64 text

network of inter connected microservices

Slide 65

Slide 65 text

Without any changes in your services

Slide 66

Slide 66 text

Without any changes in your services Control Connect Secure Observe

Slide 67

Slide 67 text

But how Istio does it?

Slide 68

Slide 68 text

App PROXY Envoy proxy

Slide 69

Slide 69 text

Envoy proxy Lightweight c++ protocol Platform-agnostic Network abstraction

Slide 70

Slide 70 text

App PROXY Mixer Policy control Telemetry collection

Slide 71

Slide 71 text

App PROXY Mixer Control Plane

Slide 72

Slide 72 text

Control Plane App PROXY Mixer Pilot Galley Citadel Service discovery Validate, process & distribute Authentication

Slide 73

Slide 73 text

Control Plane App PROXY Mixer Pilot Galley Citadel Service discovery Validate, process & distribute Authentication Data plane

Slide 74

Slide 74 text

Control Plane App PROXY Mixer Pilot Galley Citadel Control Connect Secure Observe

Slide 75

Slide 75 text

JHipster kubernetes

Slide 76

Slide 76 text

• Kubernetes + Istio configuration • Running in GCloud

Slide 77

Slide 77 text

The best practices

Slide 78

Slide 78 text

Single Responsibility Principle Smaller YAML files Split the files

Slide 79

Slide 79 text

Smaller image sizes Alpine images for the win Faster to boot

Slide 80

Slide 80 text

Healthy - Zombie

Slide 81

Slide 81 text

Single process in a container… Docker don’t know which process crashed

Slide 82

Slide 82 text

Services - RED pattern Requests - Errors - Duration pattern RED

Slide 83

Slide 83 text

Resources - USE pattern Utilization - Saturation - Errors pattern

Slide 84

Slide 84 text

Think about Requests / Limits

Slide 85

Slide 85 text

Clean up unused resources

Slide 86

Slide 86 text

Monitor and tune

Slide 87

Slide 87 text

Questions…

Slide 88

Slide 88 text

Thanks…