SlideShare a Scribd company logo
The path to a
Serverless-native era with
Kubernetes
Who i am
Paolo Mainardi
@paolomainardi - https://www.paolomainardi.com
➔
➔ CTO of Sparkfabrik -
https://www.sparkfabrik.com/en/
➔ CKA(D) certified, GCP Cloud Architect
➔ We are hiring :)
The session
● What is the hype cycle
● Serverless concepts (FaaS, BaaS, *aaS)
● Serverless on Kubernetes
The hype cycle
The hype cycle
The hype cycle
WHAT IS SERVERLESS ?
“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
1. Functions-as-a-Service (FaaS) which typically provides event-driven computing. Developers
run and manage application code with functions that are triggered by events or HTTP
requests. Developers deploy small units of code to the FaaS, which are executed as needed as
discrete actions, scaling without the need to manage servers or any other underlying
infrastructure.
2. Backend-as-a-Service (BaaS) which are third-party API-based services that replace core
subsets of functionality in an application. Because those APIs are provided as a service that
auto-scales and operates transparently, this appears to the developer to be serverless.
Serverless computing platform
SERVERLESS IS ALL
ABOUT THE
DEVELOPER EXPERIENCE
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo Mainardi
1. Cost and resource efficiency — scale down to zero
2. Pay as you go — scale up on demand
3. Automation — of scaling, failure handling, and recovery
SERVERLESS IS ALL ABOUT THE DEVELOPER EXPERIENCE©
FaaS
Functions as a Service
Use case - Translation service
FaaS - Translation service
Business requirement
Translate text files from Italian to German, both on-demand and batch
uploads.
Non-functional requirements:
● Scale up on demand
● Highly available >= 99.5%
● Scale down to zero
● Pay per use
Use case - Translation service
FaaS - Translation service
Architecture overview
● NodeJS
● Google Cloud Platform
○ Cloud services
○ Translate API
Translation service implementation
FaaS - Translation service
Non-functional requirements:
● Scale up on demand
● Highly available >= 99.5%
● Scale down to zero
● Pay as you go
FaaS - Cloud architecture #0
FaaS - Cloud architecture #1
Non-functional requirements:
● Scale up on demand
● Highly available >= 99.5%
● Scale down to zero
● Pay as you go
Non-functional requirements:
● Scale up on demand ❌
● Highly available >= 99.5% ❌
● Scale down to zero ❌
● Pay as you go ❌
FaaS - Cloud architecture #1
Service Instances Cost per month
Compute engine
(n1-standard-1)
1 30$
HTTP(s) load
balancer
1 18$
Fixed costs
TOTAL: 48$
FaaS - Cloud architecture #2
Non-functional requirements:
● Scale up on demand ✅
● Highly available >= 99.5% ❌
● Scale down to zero ❌
● Pay as you go ❌
Service Instances Cost per month
Compute engine
(n1-standard-1)
1 30$
HTTP(s) load
balancer
1 18$
Fixed costs
TOTAL: 48$
FaaS - Cloud architecture #3
Non-functional requirements:
● Scale up on demand ✅
● Highly available >= 99.5% ✅
● Scale down to zero ❌
● Pay as you go ❌
Service Instances Cost per month
Compute engine
(n1-standard-1)
1 90$
HTTP(s) load
balancer
1 18$
Fixed costs
TOTAL: 108$
FaaS - Functions as a service
TRADITIONAL
SERVERLESShttps://cloud.google.com/functions/docs/writing
Serverless refactoring
FaaS - Serverless Cloud architecture
Non-functional requirements:
● Scale up on demand ✅
● Highly available >= 99.5% ✅
● Scale down to zero ✅
● Pay as you go ✅
Service Instances Cost per month
- - -
Fixed costs
TOTAL: 0$
Credits: https://www.gocd.org/2017/06/26/serverless-architecture-continuous-delivery/
Key properties of FaaS:
● Stateless and ephemeral
● Scalable from 0 to N
● Event-triggered
● Fully managed by a third party
FasS - Functions as a service
Functions on public cloud
The state of FaaS on public cloud
● Limited language runtimes (NodeJS, Python, Java, C#)
● Vendor-proprietary mechanisms to package and deploy the functions
● Locked-in language runtime
● Proprietary Event format
●
The state of FaaS on public cloud
FaaS on public cloud
LOCK-IN
Lock-in
Lockin use-case
Convert CSV files to
JSON on GCP
{JSON}
Lock-in
Convert CSV files to
JSON coming from
multiple cloud providers
{JSON}
Lock-in
Convert CSV files to
JSON coming from
multiple cloud providers
{JSON}
Event format
Event format
Lock-in
{JSON}
Lock-in
{JSON}
CloudEvents
CLOUDEVENTS IS A SPECIFICATION
FOR DESCRIBING
EVENT DATA IN A COMMON WAY
CloudEvents
CloudEvents
CloudEvents on public cloud
https://azure.microsoft.com/de-de/blog/announcing-first
-class-support-for-cloudevents-on-azure/
Contributors
https://github.com/cloudevents/spec/blo
b/master/community/contributors.md
Azure Event Grid
WHAT IS KUBERNETES ?
What is Kubernetes
What is Kubernetes
https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services,
that facilitates both declarative configuration and automation.
The name Kubernetes originates from Greek, meaning helmsman or pilot. Google open-sourced the Kubernetes
project in 2014. Kubernetes combines over 15 years of Google’s experience running production workloads at scale
with best-of-breed ideas and practices from the community.
What is Kubernetes
What is Kubernetes
What is Kubernetes - Kubelet
Kubelet
An agent that runs on each node in the cluster.
It makes sure that containers are running in a Pod
What is Kubernetes - Pods
Pods
A Pod is a group of one or more containers with
shared storage/network, and a specification for how
to run the containers
WHY
SERVERLESS ON KUBERNETES ?
Serverless & Kubernetes
Developer experience on Kubernetes
Have to do Want to do
Write code
Serverless & Kubernetes
Developer experience on Kubernetes
Have to do Want to do
Write code
Build docker image
Serverless & Kubernetes
Have to do Want to do
Write code
Build docker image
Push docker image to registry
Developer experience on Kubernetes
Serverless & Kubernetes
Have to do Want to do
Write code
Build docker image
Push docker image to registry
Write yaml manifests
Developer experience on Kubernetes
Serverless & Kubernetes
Have to do Want to do
Write code
Build docker image
Push docker image to registry
Write yaml manifests
kubectl apply -f myapp/
Developer experience on Kubernetes
Serverless & Kubernetes
Have to do Want to do
Write code Write code
Build docker image
Push docker image to registry
Write yaml manifests
kubectl apply -f myapp/
Developer experience on Kubernetes
Serverless & Kubernetes
Have to do Want to do
Write code Write code
Build docker image Ship it
Push docker image to registry
Write yaml manifests
kubectl apply -f myapp/
Developer experience on Kubernetes
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
BUILD A SERVERLESS
DEVELOPMENT EXPERIENCE
ON KUBERNETES
● Something to wake-up workloads on request
● Something to scale-up and scale back to zero
● Something to turn the source code into a container
● An eventing system with configurable sources and subscribers
Serverless on Kubernetes to-do list:
Knative
Kubernetes-based platform to build deploy and manage modern
serverless workloads.
Knative offers features like scale-to-zero, autoscaling and eventing
framework
https://knative.dev
KNATIVE
Knative
Knative building blocks
Knative
Knative building blocks
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 of code and
configurations (revisions)
Knative
Knative serving
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.
Knative
Knative eventing
Knative
Knative eventing
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 👼.”
Knative
Tekton
1. The Tekton project provides Kubernetes-style resources for
declaring CI/CD-style pipelines
2. Builds are ran completely within Kubernetes (eg: Kaniko, Buildkit)
and using standard formats like buildpacks
3. Openly-governed under the Continuous Delivery Foundation (CDF)
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
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 thanks to
auto-scaling features.
What you can do with Knative
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 thanks to
auto-scaling features.
● As a platform architect: Build your own PaaS/FaaS platform,
relying on the Knative primitives.
What you can do with Knative
KNATIVE-NATIVE
PLATFORMS
Knative - Google Cloud Run
Google CloudRun
1. Fully GCP managed Serverless
platform based on Knative apis
2. Event-driven architecture (HTTP +
Pub/Sub)
3. Cloud Run + Cloud run for Anthos
4. A sort of managed Knative + Istio
Credits: https://twitter.com/ahmetb/status/1116041166359654400
Knative - Google Cloud Run
Google CloudRun
1. Fully GCP managed Serverless
platform based on Knative apis
2. Event-driven architecture (HTTP +
Pub/Sub)
3. Cloud Run + Cloud run for Anthos
4. A sort of managed Knative + Istio
Credits: https://ahmet.im/blog/cloud-run-is-a-knative/
Knative - Openshift serverless
Openshift Serverless
1. GA product since 30rd of April
2. Based on Knative Serving + Eventing + Tekton pipeline
3. Fully integrated with the Openshift ecosystem.
Pivotal Riff
1. Deep Kubernetes integration using CRDs
2. Pluggable application runtimes [Core, Knative...]
3. A custom builder based on buildpacks.io (source to container)
4. A custom cli tool “riff” to manage the entire lifecycle
KUBERNETES-NATIVE
PLATFORMS
Keda
Keda is an open-source CNCF sandbox project
from Microsoft and Redhat
KEDA provides a lightweight auto-scaling infrastructure
that allows to autoscale applications based on custom criteria
KEDA - Kubernetes Event Driven Autoscaling
https://keda.sh
Keda
KEDA
Keda
KEDA
Custom metrics server for HPA
Keda
KEDA
➔ Watching for new ScaledObjects
➔ In charge of scaling from 0 to 1 or vice-versa,
from 1 to N remains in charge the standard
HPA
Keda
KEDA
Kubernetes-native serverless platforms
➔ OSS platforms
➔ Flexible language runtimes
➔ Custom CLIs
➔ Written in GO (OpenWhisk in
Scala)
➔ Backed by big vendors (Oracle,
IBM, Vmware)
Kubernetes fully fledged serverless platforms
VIRTUAL KUBELET
Virtual Kubelet
Virtual Kubelet
Virtual Kubelet is an open-source Kubernetes kubelet
implementation that masquerades as a kubelet.
This allows Kubernetes nodes to be backed by Virtual Kubelet
providers such as serverless cloud container platforms
https://virtual-kubelet.io
Virtual Kubelet
Virtual Kubelet
Virtual Kubelet
Virtual Kubelet
virtual
kubelet
Virtual Kubelet
Virtual Kubelet
virtual
kubelet
Virtual kubelet register itself as a “node”
and allows developers to deploy pods
and containers with their own apis.
Virtual Kubelet
Virtual Kubelet
virtual
kubelet
AZURE
CONTAINER SERVICE HASHICORP NOMAD
AWS FARGATE
ALIBABA CLOUD ECI
YOUR
CUSTOM
PROVIDER
Serverless & Kubernetes
Serverless on Kubernetes:
Serverless & Kubernetes
Serverless on Kubernetes:
● Flexible language runtimes based on containers
● Flexible language runtimes based on containers
● Run on multi/hybrid cloud and on your laptop
Serverless & Kubernetes
Serverless on Kubernetes:
Serverless & Kubernetes
Serverless on Kubernetes:
● Flexible language runtimes based on containers
● Run on multi/hybrid cloud and on your laptop
● Mix and match stateless and stateful workloads
Serverless & Kubernetes
Serverless on Kubernetes:
● Flexible language runtimes based on containers
● Run on multi/hybrid cloud and on your laptop
● Mix and match stateless and stateful workloads
● Extensibility and a better development experience
CNCF Serverless landscape
In the cloud platforms, Serverless & k8s will essentially converge and
we’ll deploy just by asking:
“Kubernetes, just run my code”
Alexis Richardson, Founder and CEO, Weaveworks

More Related Content

What's hot (20)

PPTX
Tectonic Summit 2016: Multi-Cluster Kubernetes: Planning for Unknowns
CoreOS
 
PPTX
Kubernetes from the ground up
Sander Knape
 
PDF
Serverless architectures with Fn Project
Sven Bernhardt
 
PDF
Serverless Functions: Accelerating DevOps Adoption
All Things Open
 
PPTX
DevOpsDays 2018 - Migrating a Cloud Native App to k8s
Gökhan Şengün
 
PPTX
Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...
Docker, Inc.
 
PPTX
Infrastructure as Code and AWS CDK
SupratipBanerjee
 
PDF
[OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때
OpenStack Korea Community
 
PDF
Building Event-Driven Workflows with Knative and Tekton
Leon Stigter
 
PDF
Developing Microservices with Apache Camel, by Claus Ibsen
Judy Breedlove
 
PPTX
Kubernetes Helm: Why It Matters
Platform9
 
PDF
The what, why and how of knative
Mofizur Rahman
 
PDF
5 Habits of High-Velocity Teams Using Kubernetes
Codefresh
 
PDF
Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and...
Codefresh
 
PDF
Flagger: Istio Progressive Delivery Operator
Weaveworks
 
PDF
Real World CI/CD with Kubernetes
Opsta
 
PDF
How to Become DevOps
Opsta
 
PPTX
betterCode Workshop: Effizientes DevOps-Tooling mit Go
QAware GmbH
 
PDF
Build a RESTful API with the Serverless Framework
masahitojp
 
PDF
Nils Rhode - Does it always have to be k8s - TeC Day 2019
Haufe-Lexware GmbH & Co KG
 
Tectonic Summit 2016: Multi-Cluster Kubernetes: Planning for Unknowns
CoreOS
 
Kubernetes from the ground up
Sander Knape
 
Serverless architectures with Fn Project
Sven Bernhardt
 
Serverless Functions: Accelerating DevOps Adoption
All Things Open
 
DevOpsDays 2018 - Migrating a Cloud Native App to k8s
Gökhan Şengün
 
Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Ti...
Docker, Inc.
 
Infrastructure as Code and AWS CDK
SupratipBanerjee
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때
OpenStack Korea Community
 
Building Event-Driven Workflows with Knative and Tekton
Leon Stigter
 
Developing Microservices with Apache Camel, by Claus Ibsen
Judy Breedlove
 
Kubernetes Helm: Why It Matters
Platform9
 
The what, why and how of knative
Mofizur Rahman
 
5 Habits of High-Velocity Teams Using Kubernetes
Codefresh
 
Updating Kubernetes With Helm Charts: Build, Test, Deploy with Codefresh and...
Codefresh
 
Flagger: Istio Progressive Delivery Operator
Weaveworks
 
Real World CI/CD with Kubernetes
Opsta
 
How to Become DevOps
Opsta
 
betterCode Workshop: Effizientes DevOps-Tooling mit Go
QAware GmbH
 
Build a RESTful API with the Serverless Framework
masahitojp
 
Nils Rhode - Does it always have to be k8s - TeC Day 2019
Haufe-Lexware GmbH & Co KG
 

Similar to stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo Mainardi (20)

PDF
The path to a serverless-native era with Kubernetes
sparkfabrik
 
PDF
DCEU 18: Docker Containers in a Serverless World
Docker, Inc.
 
PDF
Knative, Serverless on Kubernetes, and Openshift
Chris Suszyński
 
PDF
Sergio Seabra - Red Hat - OSL19
marketingsyone
 
PDF
STANISLAV KOLENKIN, BAQ "K8S: network plugins - issues and performance compar...
Dakiry
 
PDF
Knative and Kubernetes - bringing serverless to more developers
Bret McGowen - NYC Google Developer Advocate
 
PDF
Why kubernetes for Serverless (FaaS)
Krishna-Kumar
 
PDF
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
CodeOps Technologies LLP
 
PPTX
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
VMUG IT
 
PPTX
Cloud Native Summit 2019 Summary
Everett Toews
 
PDF
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Bitnami
 
PDF
Running Containerized Applications on Modern Serverless Platforms
DevOps.com
 
PDF
Running and Managing Kubernetes on OpenStack
Victor Palma
 
PPTX
ATO 2018 - What is Serverless Useful For?
BerndtJung
 
PDF
Insights on Knative and how it changes the serverless landscape
Jeremias Werner
 
PDF
Serverless Spring - Nate Schutta 2/2
VMware Tanzu
 
PPTX
Application portability with kubernetes
Oleg Chunikhin
 
PPTX
Implementing FaaS on Kubernetes using Kubeless
Ahmed Misbah
 
PPTX
Kubernetes
Anastasios Gogos
 
PDF
The Platform Mullet
pczarkowski
 
The path to a serverless-native era with Kubernetes
sparkfabrik
 
DCEU 18: Docker Containers in a Serverless World
Docker, Inc.
 
Knative, Serverless on Kubernetes, and Openshift
Chris Suszyński
 
Sergio Seabra - Red Hat - OSL19
marketingsyone
 
STANISLAV KOLENKIN, BAQ "K8S: network plugins - issues and performance compar...
Dakiry
 
Knative and Kubernetes - bringing serverless to more developers
Bret McGowen - NYC Google Developer Advocate
 
Why kubernetes for Serverless (FaaS)
Krishna-Kumar
 
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
CodeOps Technologies LLP
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
VMUG IT
 
Cloud Native Summit 2019 Summary
Everett Toews
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Bitnami
 
Running Containerized Applications on Modern Serverless Platforms
DevOps.com
 
Running and Managing Kubernetes on OpenStack
Victor Palma
 
ATO 2018 - What is Serverless Useful For?
BerndtJung
 
Insights on Knative and how it changes the serverless landscape
Jeremias Werner
 
Serverless Spring - Nate Schutta 2/2
VMware Tanzu
 
Application portability with kubernetes
Oleg Chunikhin
 
Implementing FaaS on Kubernetes using Kubeless
Ahmed Misbah
 
Kubernetes
Anastasios Gogos
 
The Platform Mullet
pczarkowski
 
Ad

Recently uploaded (20)

PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PDF
custom development enhancement | Togglenow.pdf
aswinisuhu
 
PPTX
PCC IT Forum 2025 - Legislative Technology Snapshot
Gareth Oakes
 
PPTX
Transforming Lending with IntelliGrow – Advanced Loan Software Solutions
Intelli grow
 
PPTX
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
PDF
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
PDF
chapter 5.pdf cyber security and Internet of things
PalakSharma980227
 
PDF
Latest Capcut Pro 5.9.0 Crack Version For PC {Fully 2025
utfefguu
 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
PPTX
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
 
PDF
Notification System for Construction Logistics Application
Safe Software
 
PPTX
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
PDF
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
PDF
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
PPTX
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
PPTX
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PDF
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
PPTX
Lec 2 Compiler, Interpreter, linker, loader.pptx
javidmiakhil63
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
custom development enhancement | Togglenow.pdf
aswinisuhu
 
PCC IT Forum 2025 - Legislative Technology Snapshot
Gareth Oakes
 
Transforming Lending with IntelliGrow – Advanced Loan Software Solutions
Intelli grow
 
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
chapter 5.pdf cyber security and Internet of things
PalakSharma980227
 
Latest Capcut Pro 5.9.0 Crack Version For PC {Fully 2025
utfefguu
 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
 
Notification System for Construction Logistics Application
Safe Software
 
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
Lec 2 Compiler, Interpreter, linker, loader.pptx
javidmiakhil63
 
Ad

stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo Mainardi

  • 1. The path to a Serverless-native era with Kubernetes
  • 2. Who i am Paolo Mainardi @paolomainardi - https://www.paolomainardi.com ➔ ➔ CTO of Sparkfabrik - https://www.sparkfabrik.com/en/ ➔ CKA(D) certified, GCP Cloud Architect ➔ We are hiring :)
  • 3. The session ● What is the hype cycle ● Serverless concepts (FaaS, BaaS, *aaS) ● Serverless on Kubernetes
  • 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. 1. Functions-as-a-Service (FaaS) which typically provides event-driven computing. Developers run and manage application code with functions that are triggered by events or HTTP requests. Developers deploy small units of code to the FaaS, which are executed as needed as discrete actions, scaling without the need to manage servers or any other underlying infrastructure. 2. Backend-as-a-Service (BaaS) which are third-party API-based services that replace core subsets of functionality in an application. Because those APIs are provided as a service that auto-scales and operates transparently, this appears to the developer to be serverless. Serverless computing platform
  • 10. SERVERLESS IS ALL ABOUT THE DEVELOPER EXPERIENCE
  • 12. 1. Cost and resource efficiency — scale down to zero 2. Pay as you go — scale up on demand 3. Automation — of scaling, failure handling, and recovery SERVERLESS IS ALL ABOUT THE DEVELOPER EXPERIENCE©
  • 14. Use case - Translation service FaaS - Translation service Business requirement Translate text files from Italian to German, both on-demand and batch uploads. Non-functional requirements: ● Scale up on demand ● Highly available >= 99.5% ● Scale down to zero ● Pay per use
  • 15. Use case - Translation service FaaS - Translation service Architecture overview ● NodeJS ● Google Cloud Platform ○ Cloud services ○ Translate API
  • 17. Non-functional requirements: ● Scale up on demand ● Highly available >= 99.5% ● Scale down to zero ● Pay as you go FaaS - Cloud architecture #0
  • 18. FaaS - Cloud architecture #1 Non-functional requirements: ● Scale up on demand ● Highly available >= 99.5% ● Scale down to zero ● Pay as you go
  • 19. Non-functional requirements: ● Scale up on demand ❌ ● Highly available >= 99.5% ❌ ● Scale down to zero ❌ ● Pay as you go ❌ FaaS - Cloud architecture #1 Service Instances Cost per month Compute engine (n1-standard-1) 1 30$ HTTP(s) load balancer 1 18$ Fixed costs TOTAL: 48$
  • 20. FaaS - Cloud architecture #2 Non-functional requirements: ● Scale up on demand ✅ ● Highly available >= 99.5% ❌ ● Scale down to zero ❌ ● Pay as you go ❌ Service Instances Cost per month Compute engine (n1-standard-1) 1 30$ HTTP(s) load balancer 1 18$ Fixed costs TOTAL: 48$
  • 21. FaaS - Cloud architecture #3 Non-functional requirements: ● Scale up on demand ✅ ● Highly available >= 99.5% ✅ ● Scale down to zero ❌ ● Pay as you go ❌ Service Instances Cost per month Compute engine (n1-standard-1) 1 90$ HTTP(s) load balancer 1 18$ Fixed costs TOTAL: 108$
  • 22. FaaS - Functions as a service TRADITIONAL SERVERLESShttps://cloud.google.com/functions/docs/writing Serverless refactoring
  • 23. FaaS - Serverless Cloud architecture Non-functional requirements: ● Scale up on demand ✅ ● Highly available >= 99.5% ✅ ● Scale down to zero ✅ ● Pay as you go ✅ Service Instances Cost per month - - - Fixed costs TOTAL: 0$
  • 24. Credits: https://www.gocd.org/2017/06/26/serverless-architecture-continuous-delivery/ Key properties of FaaS: ● Stateless and ephemeral ● Scalable from 0 to N ● Event-triggered ● Fully managed by a third party FasS - Functions as a service
  • 25. Functions on public cloud The state of FaaS on public cloud ● Limited language runtimes (NodeJS, Python, Java, C#) ● Vendor-proprietary mechanisms to package and deploy the functions
  • 26. ● Locked-in language runtime ● Proprietary Event format ● The state of FaaS on public cloud FaaS on public cloud
  • 28. Lock-in Lockin use-case Convert CSV files to JSON on GCP {JSON}
  • 29. Lock-in Convert CSV files to JSON coming from multiple cloud providers {JSON}
  • 30. Lock-in Convert CSV files to JSON coming from multiple cloud providers {JSON}
  • 34. CloudEvents CLOUDEVENTS IS A SPECIFICATION FOR DESCRIBING EVENT DATA IN A COMMON WAY
  • 36. CloudEvents CloudEvents on public cloud https://azure.microsoft.com/de-de/blog/announcing-first -class-support-for-cloudevents-on-azure/ Contributors https://github.com/cloudevents/spec/blo b/master/community/contributors.md Azure Event Grid
  • 38. What is Kubernetes What is Kubernetes https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/ Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. The name Kubernetes originates from Greek, meaning helmsman or pilot. Google open-sourced the Kubernetes project in 2014. Kubernetes combines over 15 years of Google’s experience running production workloads at scale with best-of-breed ideas and practices from the community.
  • 39. What is Kubernetes What is Kubernetes
  • 40. What is Kubernetes - Kubelet Kubelet An agent that runs on each node in the cluster. It makes sure that containers are running in a Pod
  • 41. What is Kubernetes - Pods Pods A Pod is a group of one or more containers with shared storage/network, and a specification for how to run the containers
  • 43. Serverless & Kubernetes Developer experience on Kubernetes Have to do Want to do Write code
  • 44. Serverless & Kubernetes Developer experience on Kubernetes Have to do Want to do Write code Build docker image
  • 45. Serverless & Kubernetes Have to do Want to do Write code Build docker image Push docker image to registry Developer experience on Kubernetes
  • 46. Serverless & Kubernetes Have to do Want to do Write code Build docker image Push docker image to registry Write yaml manifests Developer experience on Kubernetes
  • 47. Serverless & Kubernetes Have to do Want to do Write code Build docker image Push docker image to registry Write yaml manifests kubectl apply -f myapp/ Developer experience on Kubernetes
  • 48. Serverless & Kubernetes Have to do Want to do Write code Write code Build docker image Push docker image to registry Write yaml manifests kubectl apply -f myapp/ Developer experience on Kubernetes
  • 49. Serverless & Kubernetes Have to do Want to do Write code Write code Build docker image Ship it Push docker image to registry Write yaml manifests kubectl apply -f myapp/ Developer experience on Kubernetes
  • 50. 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
  • 51. BUILD A SERVERLESS DEVELOPMENT EXPERIENCE ON KUBERNETES
  • 52. ● Something to wake-up workloads on request ● Something to scale-up and scale back to zero ● Something to turn the source code into a container ● An eventing system with configurable sources and subscribers Serverless on Kubernetes to-do list:
  • 53. Knative Kubernetes-based platform to build deploy and manage modern serverless workloads. Knative offers features like scale-to-zero, autoscaling and eventing framework https://knative.dev KNATIVE
  • 56. 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 of code and configurations (revisions)
  • 58. 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.
  • 61. 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 👼.”
  • 62. Knative Tekton 1. The Tekton project provides Kubernetes-style resources for declaring CI/CD-style pipelines 2. Builds are ran completely within Kubernetes (eg: Kaniko, Buildkit) and using standard formats like buildpacks 3. Openly-governed under the Continuous Delivery Foundation (CDF)
  • 63. 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
  • 64. 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 thanks to auto-scaling features. What you can do with Knative
  • 65. 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 thanks to auto-scaling features. ● As a platform architect: Build your own PaaS/FaaS platform, relying on the Knative primitives. What you can do with Knative
  • 67. Knative - Google Cloud Run Google CloudRun 1. Fully GCP managed Serverless platform based on Knative apis 2. Event-driven architecture (HTTP + Pub/Sub) 3. Cloud Run + Cloud run for Anthos 4. A sort of managed Knative + Istio Credits: https://twitter.com/ahmetb/status/1116041166359654400
  • 68. Knative - Google Cloud Run Google CloudRun 1. Fully GCP managed Serverless platform based on Knative apis 2. Event-driven architecture (HTTP + Pub/Sub) 3. Cloud Run + Cloud run for Anthos 4. A sort of managed Knative + Istio Credits: https://ahmet.im/blog/cloud-run-is-a-knative/
  • 69. Knative - Openshift serverless Openshift Serverless 1. GA product since 30rd of April 2. Based on Knative Serving + Eventing + Tekton pipeline 3. Fully integrated with the Openshift ecosystem. Pivotal Riff 1. Deep Kubernetes integration using CRDs 2. Pluggable application runtimes [Core, Knative...] 3. A custom builder based on buildpacks.io (source to container) 4. A custom cli tool “riff” to manage the entire lifecycle
  • 71. Keda Keda is an open-source CNCF sandbox project from Microsoft and Redhat KEDA provides a lightweight auto-scaling infrastructure that allows to autoscale applications based on custom criteria KEDA - Kubernetes Event Driven Autoscaling https://keda.sh
  • 74. Keda KEDA ➔ Watching for new ScaledObjects ➔ In charge of scaling from 0 to 1 or vice-versa, from 1 to N remains in charge the standard HPA
  • 76. Kubernetes-native serverless platforms ➔ OSS platforms ➔ Flexible language runtimes ➔ Custom CLIs ➔ Written in GO (OpenWhisk in Scala) ➔ Backed by big vendors (Oracle, IBM, Vmware) Kubernetes fully fledged serverless platforms
  • 78. Virtual Kubelet Virtual Kubelet Virtual Kubelet is an open-source Kubernetes kubelet implementation that masquerades as a kubelet. This allows Kubernetes nodes to be backed by Virtual Kubelet providers such as serverless cloud container platforms https://virtual-kubelet.io
  • 81. Virtual Kubelet Virtual Kubelet virtual kubelet Virtual kubelet register itself as a “node” and allows developers to deploy pods and containers with their own apis.
  • 82. Virtual Kubelet Virtual Kubelet virtual kubelet AZURE CONTAINER SERVICE HASHICORP NOMAD AWS FARGATE ALIBABA CLOUD ECI YOUR CUSTOM PROVIDER
  • 84. Serverless & Kubernetes Serverless on Kubernetes: ● Flexible language runtimes based on containers
  • 85. ● Flexible language runtimes based on containers ● Run on multi/hybrid cloud and on your laptop Serverless & Kubernetes Serverless on Kubernetes:
  • 86. Serverless & Kubernetes Serverless on Kubernetes: ● Flexible language runtimes based on containers ● Run on multi/hybrid cloud and on your laptop ● Mix and match stateless and stateful workloads
  • 87. Serverless & Kubernetes Serverless on Kubernetes: ● Flexible language runtimes based on containers ● Run on multi/hybrid cloud and on your laptop ● Mix and match stateless and stateful workloads ● Extensibility and a better development experience
  • 89. In the cloud platforms, Serverless & k8s will essentially converge and we’ll deploy just by asking: “Kubernetes, just run my code” Alexis Richardson, Founder and CEO, Weaveworks