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

PDF
Cloud native - CI/CD
PDF
Building and Running Workloads the Knative Way
PDF
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
PPTX
Building CI/CD Pipelines with Jenkins and Kubernetes
PDF
IaC on AWS Cloud
PPTX
Going Serverless with Kubeless In Google Container Engine (GKE)
PPTX
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
PPTX
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Cloud native - CI/CD
Building and Running Workloads the Knative Way
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Building CI/CD Pipelines with Jenkins and Kubernetes
IaC on AWS Cloud
Going Serverless with Kubeless In Google Container Engine (GKE)
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...

What's hot (20)

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

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
PDF
DCEU 18: Docker Containers in a Serverless World
PDF
Knative, Serverless on Kubernetes, and Openshift
PDF
Sergio Seabra - Red Hat - OSL19
PDF
STANISLAV KOLENKIN, BAQ "K8S: network plugins - issues and performance compar...
PDF
Knative and Kubernetes - bringing serverless to more developers
PDF
Why kubernetes for Serverless (FaaS)
PDF
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
PPTX
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
PPTX
Cloud Native Summit 2019 Summary
PDF
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
PDF
Running Containerized Applications on Modern Serverless Platforms
PDF
Running and Managing Kubernetes on OpenStack
PPTX
ATO 2018 - What is Serverless Useful For?
PDF
Insights on Knative and how it changes the serverless landscape
PDF
Serverless Spring - Nate Schutta 2/2
PPTX
Application portability with kubernetes
PPTX
Implementing FaaS on Kubernetes using Kubeless
PPTX
Kubernetes
PDF
The Platform Mullet
The path to a serverless-native era with Kubernetes
DCEU 18: Docker Containers in a Serverless World
Knative, Serverless on Kubernetes, and Openshift
Sergio Seabra - Red Hat - OSL19
STANISLAV KOLENKIN, BAQ "K8S: network plugins - issues and performance compar...
Knative and Kubernetes - bringing serverless to more developers
Why kubernetes for Serverless (FaaS)
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
Cloud Native Summit 2019 Summary
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Running Containerized Applications on Modern Serverless Platforms
Running and Managing Kubernetes on OpenStack
ATO 2018 - What is Serverless Useful For?
Insights on Knative and how it changes the serverless landscape
Serverless Spring - Nate Schutta 2/2
Application portability with kubernetes
Implementing FaaS on Kubernetes using Kubeless
Kubernetes
The Platform Mullet
Ad

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
medical staffing services at VALiNTRY
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
Transform Your Business with a Software ERP System
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Designing Intelligence for the Shop Floor.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Navsoft: AI-Powered Business Solutions & Custom Software Development
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Monitoring Stack: Grafana, Loki & Promtail
Wondershare Filmora 15 Crack With Activation Key [2025
medical staffing services at VALiNTRY
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Patient Appointment Booking in Odoo with online payment
Design an Analysis of Algorithms II-SECS-1021-03
17 Powerful Integrations Your Next-Gen MLM Software Needs
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Computer Software and OS of computer science of grade 11.pptx
AutoCAD Professional Crack 2025 With License Key
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Transform Your Business with a Software ERP System
Complete Guide to Website Development in Malaysia for SMEs
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Designing Intelligence for the Shop Floor.pdf

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