Slide 1

Slide 1 text

Knative & Serverless.com Bring your Functions at ease to the power of Kubernetes $ kn faas list Brian Tannous Developer Advocate at Red Hat Natale Vinto Developer Advocate at Red Hat

Slide 2

Slide 2 text

About us Natale Vinto Natale is a Developer Advocate for OpenShift at Red Hat, helping people within communities and customers achieve success with their Kubernetes and Cloud Native strategy. @natalevinto #cloudnativeitaly #serverless #kubernetes #openshift

Slide 3

Slide 3 text

About us Brian Tannous Brian is a Developer Advocate at Red Hat, enabling developers and operators to maximize their use of OpenShift and Kubernetes. I have interests in all things Cloud Native and currently focus on OpenShift and Kubernetes. While I enjoy all things OpenShift, I am a Platform Services specialist focused on the tools and services within OpenShift that help make the use of Kubernetes simpler and more robust. My latest special focus is Serverless or Knative and Service Mesh or Istio, Envoy, Jaeger, Kiali. @briantannous #cloudnativeitaly #serverless #service-mesh#kubernetes #openshift

Slide 4

Slide 4 text

Agenda ● What’s Serverless? ● Why Serverless ● Serverless Architectures ● Knative ● Knative Serving & Eventing ● Knative Components: Serverless.com ● Demo

Slide 5

Slide 5 text

What’s Serverless? “Serverless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment.” CNCF Serverless Whitepaper 1.0

Slide 6

Slide 6 text

What’s Serverless? Event Your Application Results trigger produce HTTP Requests Kafka Messages Image Uploaded New Order Login from user

Slide 7

Slide 7 text

What’s Serverless? A serverless web application Container HTTP Request Container HTTP Request Database Browser Browser myapp.example.com

Slide 8

Slide 8 text

What’s Serverless? A serverless web application Container HTTP Request Container HTTP Request Database Browser Browser myapp.example.com Benefits of this model: ● No need to setup auto-scaling and load balancers ○ Scale down and save resources when needed. ○ Scale up to meet the demand. ● No tickets to configure SSL for applications ● Enable Event Driven Architectures (EDA) patterns ● Enable teams to associate cost with IT ● Modernize existing applications to run as serverless containers

Slide 9

Slide 9 text

What’s Serverless? Processing a Kafka message Container Container Storage Kafka Message Kafka Messages External System External System

Slide 10

Slide 10 text

Why Serverless Over provisioning Time in capacity planning IT cost of idle resources Under provisioning Lost business revenue Poor quality of service More applications Direct line between IT costs & business revenue

Slide 11

Slide 11 text

Why Serverless Technology is a utility. The Serverless approach abstracts complexity delivering on the utility premise. ↓ Extensive Architecture and Design ↓ Management and Provisioning ↓ Capacity Planning Sessions ↓ Monoliths and Application Servers ↑ Simplified approach to Kubernetes ↑ Workloads dynamic scale ↑ Sensible defaults ↑ More experimentation, more granular

Slide 12

Slide 12 text

1. https://www.oreilly.com/radar/oreilly-serverless-survey-2019-concerns-what-works-and-what-to-expect/ 2. Forrester - Now Tech: Serverless, Q4 2019 40% of enterprises adopted Serverless technologies or practices with expected growth coming in the next 12 to 18 months.¹ 60% of the serverless practitioners reported "reduction of operational costs” with the second biggest benefit being "scale with demand automatically" Vendor lock-in is the second biggest concern when adopting Serverless technologies.¹ Serverless Market Trend

Slide 13

Slide 13 text

Serverless the Open source way! ● Kubernetes is the de facto standard for container orchestration ● Kubernetes modularity enable plugin and components to extend its capabilities ● Kubernetes Serverless is Knative

Slide 14

Slide 14 text

Knative Knative extends Kubernetes to provide a set of middleware components that are essential to build modern, source-centric, and container-based applications that can run anywhere: on premises, in the cloud, or even in a third-party data center.

Slide 15

Slide 15 text

Knative Components Knative consists of the Serving and Eventing components: ● Serving - Request-driven compute that can scale to zero ● Eventing - Management and delivery of events

Slide 16

Slide 16 text

Knative Serving An event-driven model that serves the container with your application and can scale to zero ● Configurations represent the ‘floating HEAD’ of a history of Revisions ● Revisions represent immutable snapshot of code and configuration ● Routes configure ingress over a collection of Revisions and/or Configurations ● Services (nope, not K8s services) are top-level controllers that manage a set of Routes and Configurations to implement a network service

Slide 17

Slide 17 text

Knative Serving 22 lines ~70 lines

Slide 18

Slide 18 text

Knative CLI: kn $ kn service create myService --image=[registry/mycontainer:v1] --min-scale=1 --max-scale=100 $ kn service update myService --traffic myService-rev1=50,myService-rev2=50 $ kn source cronjob create my-cron --schedule "* * * * */1" --data "ping" --sink svc:myService

Slide 19

Slide 19 text

Knative Serving kn service kn service create kn service delete kn service describe kn service list kn service update Configuration Revision 1 Revision 2 Revision 3 Application (Knative Service) Routes Directs traffic Traffic splitting kn revision kn revision delete kn revision describe kn revision list kn route kn route describe kn route list

Slide 20

Slide 20 text

Knative Eventing Address a common need for cloud native development and provides composable primitives to enable late-binding event sources and event consumers.

Slide 21

Slide 21 text

Knative Eventing kn service kn service create kn service delete kn service describe kn service list kn service update Configuration Revision 1 Revision 2 Revision 3 Application (Knative Service) Routes Directs traffic Traffic splitting kn revision kn revision delete kn revision describe kn revision list kn route kn route describe kn route list Event Source Event Providers kn source kn source create kn source list kn source list-types Event

Slide 22

Slide 22 text

Serverless.com & Knative ● The Serverless Framework is a free and open-source web framework written using Node.js ● Originally used to deploy AWS Lamba functions, it can now deployed to other function as a service provider as Knative

Slide 23

Slide 23 text

Serverless.com Components ● It can deploy and manage containerized applications on serverless Knative infrastructure easily ● Deploy applications written in any programming language ● The Kubernetes mode will use Kaniko for building a container image from your source code and user Docker Hub as a registry for handing over the container image to Knative

Slide 24

Slide 24 text

Demo time! ● Minikube+OLM ● Knative Serving ● Serverless.com Knative component ● Eclipse Che ● NodeJS function ● Link to the Demo

Slide 25

Slide 25 text

What’s next? ● Knative FaaS ● More integrations ● More Serverless! Learn Knative: ● Knative.dev ● Knative Tutorial ● Knative Cookbook

Slide 26

Slide 26 text

THANK YOU! @briantannous @natalevinto #cloudnativeitaly #serverless #knative #kubernetes