Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Knative & Serverless on Kubernetes, and OpenShift

Knative & Serverless on Kubernetes, and OpenShift

Is Serverless just running functions in a cloud? It’s more than that! Serverless computing refers to the concept of building and running applications that do not require server management.

It describes a 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.

During the talk I’ll show how to use Knative both on Kubernetes and on OpenShift platform. Hopefully we will see why your organization should consider using Knative as one of its primary deployments models on hybrid cloud world.

Chris Suszynski

March 02, 2020
Tweet

More Decks by Chris Suszynski

Other Decks in Programming

Transcript

  1. on Kubernetes, and OpenShift Knative & Serverless RED HAT OPENSHIFT

    SERVERLESS Chris Suszynski twitter.com/ksuszynski 1
  2. About me 2 Chris Suszynski • Senior Quality Engineer at

    Red Hat • Work on OpenShift Serverless • Java & Puppet enthusiast • Golang lover (1y) • 15y+ of development experience • using DevOps from ~2010, trainer from 2014 • breathe Open Source ~70 original OSS repos • public speaker on meetups & conferences • happy father & husband
  3. Agenda 3 RED HAT OPENSHIFT SERVERLESS 1. Introduction 2. What

    is Serverless & Knative? 3. Serverless vs FaaS 4. Knative components overview 5. Knative Serving 6. Knative Eventing 7. OpenShift Serverless 8. Q&A
  4. We need new ideas 18 “We cannot solve our problems

    with the same thinking we used when we created them” ⸺ Albert Einstein (Theoretical Physicist)
  5. 19 Road to Awesomeness Self-Service, On-Demand, Elastic Infrastructure Automation CI

    & CD Deployment Pipeline Advanced Deployment Techniques Microservices Re-Org to DevOps
  6. Serverless computing 21 What is ? “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.” ⸺ Cloud Native Computing Foundation https://www.cncf.io/blog/2018/02/14/cncf-takes-first-step-towards-serverless-computing
  7. 22 Short history of Serverless AWS S3 March 2006 AWS

    Lambda November 2014 AWS EC2 August 2006 Serverless Described Thoughtworks August 2016 Serverless Coined October 2012 Serverless Assess Thoughtworks Radar April 2016 AWS Dynamo DB January 2012 Firebase September 2011 Iron.io July 2011 Google Cloud Function Feb 2016 Azure Functions Mar 2016 Pivotal Riff Dec 2017 Oracle Functions Sept 2016 IBM Bluemix OpenWhisk Feb 2016 Oracle Fn Project Oct 2017
  8. Serverless vs FaaS 23 Serverless • No server mgmt •

    Ease of use • Scales to zero FaaS • Builds and runs your function • Atomic size
  9. Knative? 27 What is • Open source project started by

    Google • Serverless computing on Kubernetes • Set of loosely coupled primitives for all • Makes using Kubernetes easier for Dev & Ops • Autoscaling, from zero to ∞ • Advanced techniques like Blue/Green deployments, eventing system
  10. 29 Knative primitives DX Functions Event Sources Build Tools Vendors

    FaaS Stuff Traffic shaping Autoscaling Invokers Event Binding Routing Observability Serverless Stuff Deployment Replicaset Pod Service CRD Infrastructure
  11. 30 What Knative provides? Traffic shaping Autoscaling Invokers Event Binding

    Routing Observability Serverless Stuff "Knative provides 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"
  12. Interesting Capabilities 31 • Scale-to-zero: No pod == no memory

    • Scale-from-zero: Traffic spike starts N pods • Configurations & Revisions - built-in Blue/Green • In-Cluster Image Building (Tekton) • Traffic splitting • Eventing System
  13. Knative service 37 Deployment N Replicaset N Pod Service Pod

    Pod N Configuration Revision N serving.knative.dev/v1alpha1 Service Route Service Istio Gateway VirutalService Activator ImageCache PodAutoscaler ClusterIngress
  14. kubectl get crd | grep eventing channels.eventing.knative.dev subscriptions.eventing.knative.dev brokers.eventing.knative.dev cronjobsources.sources.eventing.knative.dev

    githubsources.sources.eventing.knative.dev kuberneteseventsources.sources.eventing.knative.dev containersources.sources.eventing.knative.dev Knative Eventing CRD’s 41
  15. Knative Eventing elements 42 Kafka implementation Topic Event Producer Event

    Source Channel Broker Trigger Subscription Kafka implementation Topic Trigger Filtering Knative Service
  16. Knative Eventing Sources 44 • Github • Websockets • AWS

    SQS • GCP PubSub • Apache Kafka • Apache Camel • github.com/knative/eventing-contrib • github.com/knative/eventing-sources
  17. OpenShift Serverless? 47 What is • Red Hat product, based

    on Knative project • Uses Red Hat Service Mesh, in future Kourier • Supported & tested Knative on OpenShift • Focus on Developer Experience (DX) • Easy to install with OpenShift Operator Hub • Awesome administration console
  18. 49 Knative Resources • bit.ly/knative-tutorial • developers.redhat.com/coderland/serverless • github.com/cardil/knative-kafka-demo •

    bit.ly/kubernetes-tutorial • bit.ly/istio-tutorial • bit.ly/quarkus-tutorial • developers.redhat.com