SlideShare a Scribd company logo
1 of 89
Download to read offline
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
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

What's hot (20)

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

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

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

The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
GCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native ArchitecturesGCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native Architectures
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/Kubernetes
 
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and KnativeBuild and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
 
Spring Boot & Spring Cloud on k8s and PCF
Spring Boot & Spring Cloud on k8s and PCFSpring Boot & Spring Cloud on k8s and PCF
Spring Boot & Spring Cloud on k8s and PCF
 
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud ServicesGIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
 
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes Toolbox
 
CI/CD patterns for cloud native apps
CI/CD patterns for  cloud native appsCI/CD patterns for  cloud native apps
CI/CD patterns for cloud native apps
 
Pivotal CloudFoundry on Google cloud platform
Pivotal CloudFoundry on Google cloud platformPivotal CloudFoundry on Google cloud platform
Pivotal CloudFoundry on Google cloud platform
 
CI/CD Across Multiple Environments
CI/CD Across Multiple EnvironmentsCI/CD Across Multiple Environments
CI/CD Across Multiple Environments
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
 
Zero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - AnywhereZero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - Anywhere
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
 
Docker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITDocker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-IT
 
'DOCKER' & CLOUD: ENABLERS For DEVOPS
'DOCKER' & CLOUD:  ENABLERS For DEVOPS'DOCKER' & CLOUD:  ENABLERS For DEVOPS
'DOCKER' & CLOUD: ENABLERS For DEVOPS
 
Containers as a Service with Docker
Containers as a Service with DockerContainers as a Service with Docker
Containers as a Service with Docker
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 

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
  • 11.
  • 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