Slide 1

Slide 1 text

Knative: k8s for developers Knative: k8s for developers

Slide 2

Slide 2 text

Claudio E. de Oliveira Sr. Software Engineer @ZUP Innovation Java & Golang K8s, Docker & Mesh

Slide 3

Slide 3 text

1 - What is K8s 4 - Demos 3 - Knative 2 - k8s in developer perspective Agenda Agenda

Slide 4

Slide 4 text

What is kubernetes??

Slide 5

Slide 5 text

Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/

Slide 6

Slide 6 text

and what is kubernetes in developers perspective??

Slide 7

Slide 7 text

Containers PODs ReplicaSets Deployments Endpoints Services Secrets ConfigMaps Volumes / PV / PVC Ingress / LBs Networks K8s Primitives K8s Tools yamls Istio helm kubectl Spec and Status

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

but...wait….it is not made for developers...is pretty much infrastructure for them… that is the turning point

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

https://tanzu.vmware.com/content/blog/kubernetes-is-a-platform-for-building-platforms “So adopt Kubernetes. Get it running. And recognize that it’s a platform for running other platforms that will improve your software delivery and business outcomes.” - Richard Seroter is the VP of Product Marketing at Pivotal

Slide 13

Slide 13 text

Some examples

Slide 14

Slide 14 text

Introducing Knative Introducing Knative

Slide 15

Slide 15 text

What is Knative??? The purpose of Knative is to provide a simple, consistent layer over Kubernetes that solves common problems of deploying software. Remember: Kubernetes is a platform for building platforms

Slide 16

Slide 16 text

Built for developers!!!! This layer creates a firmer boundary between the developer and the platform, allowing the developer to concentrate of the software they are directly responsible for.

Slide 17

Slide 17 text

Built as a k8s extensions There is no restrictions regarding k8s If you need you can use full k8s resources it integrates with non-knative resources

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

Platform teams or Platform Owners - Platform teams build, deploy, monitor, and are on call for the platform components and underlying platform infrastructure. https://martinfowler.com/articles/talk-about-platforms.html https://thenewstack.io/linkerd-2-0-the-service-mesh-for-service-owners-platform-architects-sres/

Slide 21

Slide 21 text

we will focus on knative Serving

Slide 22

Slide 22 text

How it works??? Knative is a collection of processes, a.k.a containers, that run in k8s cluster. Knative uses CRDs, or kubernetes extensions and enables developers to use yamls like vanilla kubernetes.

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

knative uses extensively kubernetes objects & concepts to achieve their goal

Slide 25

Slide 25 text

Some words about infrastructure...few words… I Promise!!!!

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

but for developers there are only four main concepts to understand...

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

let's understand a little bit

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

Configuration Configuration is a definition of our software, the list of containers and environments variables required to application run

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Revisions Snapshot of an app considering configuration, every time that configuration changes a new revision will be provisioned. In favor of immutable infrastructure

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Routes Is the way that Knative uses to map incoming requests to a specific revision. Get traffic for our applications

Slide 39

Slide 39 text

Routes Questions that Routes wants to answer…. At what public address or URL will traffic arrive from ? What targets can I send traffic to ? What percentage of traffic goes to which targets?

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Service Manage the application's lifecycle Our application abstraction

Slide 43

Slide 43 text

let's see some knative use cases

Slide 44

Slide 44 text

Abstract infra for developer Infra for Developer Demo #1

Slide 45

Slide 45 text

Problem : k8s is a quite complex for developers deployments, services, configmaps….. Solution: Simple element Service

Slide 46

Slide 46 text

Releasing Software Releasing software Demo #2

Slide 47

Slide 47 text

Problem : release a new version of our software Solution: Release a new version using Canary Release

Slide 48

Slide 48 text

Problem : release a new version of our software Solution: Release a new version using Canary Release

Slide 49

Slide 49 text

Plus: Rollback immediately

Slide 50

Slide 50 text

Increasing Demand Auto-Scaling Rules Increase demand - Auto-Scaling Rules Demo #3

Slide 51

Slide 51 text

Problem : demand increasing our services should attend effectively Solution: Using KPA to provide elastic infrastructure

Slide 52

Slide 52 text

Plus: Scale to zero feature

Slide 53

Slide 53 text

Tips Tips

Slide 54

Slide 54 text

Bootstrap time matter (if you are using scale to zero)

Slide 55

Slide 55 text

Spring

Slide 56

Slide 56 text

Micronaut

Slide 57

Slide 57 text

Quarkus (native image)

Slide 58

Slide 58 text

Conclusions Conclusions

Slide 59

Slide 59 text

Knative is not only serverless. It is a complete platform to help developers in software delivery topic

Slide 60

Slide 60 text

Take a look on Knative Eventing it can be very helpful to work with Event Driven Architecture

Slide 61

Slide 61 text

github https://github.com/claudioed/cloud-conference-day-ops docker images are available at docker hub

Slide 62

Slide 62 text

Serverless Quarkus Serverless

Slide 63

Slide 63 text

https://developers.redhat.com/books/knative-cookbook https://www.manning.com/books/knative-in-action

Slide 64

Slide 64 text

Obrigad_!