SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
The path to a serverless-native era with Kubernetes
In this talk we'll talk about how the Serverless paradigms are changing the way we develop applications and cloud infrastructure and how we can implement them in a
efficient and seamless way with Kubernetes.
We'll go through the latest Kubernetes Serverless technologies, talking about all the aspects
including pricing, scalability, observability and best practices.
In this talk we'll talk about how the Serverless paradigms are changing the way we develop applications and cloud infrastructure and how we can implement them in a
efficient and seamless way with Kubernetes.
We'll go through the latest Kubernetes Serverless technologies, talking about all the aspects
including pricing, scalability, observability and best practices.
8.
“Serverless computing refers to the concept of building and
running applications that do not require server management”
CNCF Serverless Whitepaper v1.0 - https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview
9.
SERVERLESS IS ALL
ABOUT THE
DEVELOPER EXPERIENCE
10.
1. Cost and resource efficient — scale down to zero
2. Pay as you go — scale up on demand
3. Automation — of scale, failure handling, and recovery
4. Supporting the full dev cycle — dev, build, CI, prod
SERVERLESS IS ALL ABOUT THE DEVELOPER EXPERIENCE
Functions
11.
What is Serverless
How we think about Serverless
FUNCTIONS EVENTS
A piece of code (usually written in
Javascript ) to perform a specific task.
A response to something that
happens in the cloud that triggers my
functions.
and
12.
Functions
Use case #1
Credits: https://github.com/mhausenblas/2018-state-of-faas-on-kube
Translate a text file from
Italian to English*.
* only pay what you use
13.
Functions
Use case #2
Credits: https://github.com/mhausenblas/2018-state-of-faas-on-kube
Process real-time data
and push notifications
to clients*
* only pay what you use
14.
What is Serverless
Credits: https://www.gocd.org/2017/06/26/serverless-architecture-continuous-delivery/
Key properties of FaaS:
● Independent, server-side, logical functions
● Stateless, ephemeral
● Event-triggered
● Scalable from 0 to N
● Short-lived processes
● Fully managed by a third party (AWS Lambda, GCP Functions,
Azure Functions, Alibaba Cloud Function Compute…)
16.
BAAS - Backend as a service
Credits: https://blog.neap.co/the-serverless-series-what-is-serverless-d651fbacf3f4
17.
Credits: https://blog.neap.co/the-serverless-series-what-is-serverless-d651fbacf3f4
SERVERLESS
IS ALL ABOUT THE
BILLING MODEL
18.
“A Serverless solution is one that costs you nothing
to run if nobody is using it (excluding data storage)”
“A simple definition of serverless,Paul Johnston, 2017”
20.
What is Serverless
Serverless on public cloud
● Limited language runtimes supported (Lambda, GCP, Azure etc..)
● Vendor-proprietary mechanisms to package and deploy the functions
21.
What is Serverless
Serverless on public cloud
● Proprietary Event format
● Locked-in language runtime
● Limited support to run or debug functions locally
33.
Serverless & Kubernetes
Developing on Kubernetes is not easy
1. It’s not the right abstractions for end-developer
experience (eg: deployment, service, ingress, hpa,
monitoring)
2. But it’s a great platform to build a PaaS on top of
it: Primitives, Extensibility
34.
Serverless & Kubernetes
Developer experience
Have to do Want to do
Write code
35.
Serverless & Kubernetes
Developer experience
Have to do Want to do
Write code
Build docker image
36.
Serverless & Kubernetes
Have to do Want to do
Write code
Build docker image
Push docker image to registry
Developer experience
37.
Serverless & Kubernetes
Have to do Want to do
Write code
Build docker image
Push docker image to registry
Expose to internet
Developer experience
38.
Serverless & Kubernetes
Have to do Want to do
Write code
Build docker image
Push docker image to registry
Expose to internet
Set-up monitoring
Developer experience
39.
Serverless & Kubernetes
Have to do Want to do
Write code
Build docker image
Push docker image to registry
Expose to internet
Set-up monitoring
Set-up autoscaling
Developer experience
40.
Serverless & Kubernetes
Have to do Want to do
Write code Write code
Build docker image
Push docker image to registry
Expose to internet
Set-up monitoring
Set-up autoscaling
Developer experience
42.
Knative
● Something to wake-up your workloads on request
● Something to scale-up and scale back to zero
● Something to turn your code into a container
● Something to collect metrics and export telemetry
● Traffic splitting and rollout strategies
● An eventing system with configurable sources and subscribers
DIY FaaS on Kubernetes
43.
Knative
Kubernetes-based platform to build deploy and manage modern
serverless workloads.
Knative offers features like scale-to-zero, autoscaling and eventing
framework for cloud-native applications on Kubernetes.
https://knative.dev
KNATIVE
47.
Knative
What is Knative
● A set of building blocks to construct your own Paas/FaaS
○ Abstracts common Kubernetes API objects (Build, Deploy,
Serve)
● An abstraction on top of Kubernetes
○ It’s still Kubernetes: It just run containers.
48.
Knative
Knative serving
1. Scale-up and scale back to zero
2. Fine-grained traffic routing
3. Automatic metrics and telemetry
4. Point-in-time snapshot (revisions)
49.
Knative
Knative eventing
1. A complete eventing system
for event-driven apps.
2. Easy for developers to
consume events
(CloudEvents spec)
3. Pluggable, Customizable
Event Sources.
51.
Knative
Knative build
“Deprecating Knative Build would resolve this confusion as it would make it clear that the
"building the service(s) image" part is not Knative's responsability and user can use whatever
tools is capable of doing that — preferably Tekton Pipelines 👼.”
52.
Knative
Tektonik pipeline
1. The Tekton Pipelines project provides Kubernetes-style resources for
declaring CI/CD-style pipelines
2. Builds are ran completely within Kubernetes (no need of Docker)
3. Build Templates are prepackaged descriptions of different ways to
build code (Kaniko, Buildpacks and more)
54.
Knative
● As a developer: Use it directly to deploy your stuff in a more
streamlined way than raw Kubernetes.
What you can do with Knative
55.
Knative
● As a developer: Use it directly to deploy your stuff in a more
streamlined way than raw Kubernetes.
● As an operator: Put a level of abstractions between Kubernetes
and your devs; Keep the costs under control by scaling to 0
unused workloads.
What you can do with Knative
56.
Knative
● As a developer: Use it directly to deploy your stuff in a more
streamlined way than raw Kubernetes.
● As an operator: Put a level of abstractions between Kubernetes
and your devs; Keep the costs under control by scaling to 0
unused workloads.
● As a platform architect: Build your own PaaS/FaaS platform,
relying on the Knative primitives.
What you can do with Knative
58.
Knative - Pivotal Riff
Pivotal Riff
1. Open source project from Pivotal Vmware
2. Deep Kubernetes integration using CRDs
3. Pluggable application runtimes [Core, Knative...]
4. A custom builder based on buildpacks.io (source to container)
5. A custom cli tool “riff” to manage the entire lifecycle
59.
Knative - Google Cloud Run
Google CloudRun
1. Fully GCP managed beta
Serverless platform based on
Knative
2. Event-driven architecture (HTTP +
Pub/Sub)
3. Cloud Run on GKE + Anthos (aka:
GKE-on prem)
4. A sort of managed Knative + Istio
Credits: https://twitter.com/ahmetb/status/1116041166359654400
60.
Knative - Openshift serverless
Openshift Serverless
1. OpenShift Serverless is a Technology Preview feature only (not yet
supported)
2. Based on Knative Serving + Eventing + Tekton pipeline
3. Can be integrated with other OpenShift services, such as Pipelines,
Service Mesh, Monitoring and Metering
65.
Kubernetes-native serverless platforms
➔ Open source platforms
➔ Flexible language runtimes
➔ Custom CLIs
➔ Written in GO (OpenWhisk in
Scala)
➔ Backed by big vendors (Oracle,
IBM, Vmware)
Kubernetes open-source serverless platforms
67.
Serverless & Kubernetes
Serverless on Kubernetes:
68.
Serverless & Kubernetes
Serverless on Kubernetes:
● Container based language runtimes
69.
● Container based language runtimes
● Multi/hybrid cloud and on your laptop
Serverless & Kubernetes
Serverless on Kubernetes:
70.
Serverless & Kubernetes
Serverless on Kubernetes:
● Container based language runtimes
● Multi/hybrid cloud and on your laptop
● Mix and match stateless and stateful workloads
71.
Serverless & Kubernetes
Serverless on Kubernetes:
● Container based language runtimes
● Multi/hybrid cloud and on your laptop
● Mix and match stateless and stateful workloads
● Kubernetes as the operating system for cloud-native
development