SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
Build Your Own Serverless With Knative
Alex Gervais
ConFoo Montreal
Feb. 27, 2020
Bonjour-Hi!
Outdoorsy, data-driven, eternal student, not so geeky creative
mind and traveler. Alex is a curious, introverted and humble
character. Working by day as a Senior Software Developer at
Datawire he has many years of savoir-faire building full-stack
systems from cloud infrastructures to backend services and
DevOps tools. Alex is a Kubernetes early adopter who thrives on
collaboration and contributor to many Cloud-Native projects.
@alex_gervais on twitter
alexgervais on github
Table of Contents
Why Serverless?
Knative
CloudEvents
Up and running with the
Ambassador Edge Stack
Landscape
● Paradigms
● Cloud vendor solutions
● Runtime environment
● Abstractions
Serverless
● Event-driven architectures
● Pay-per-use
● Servicefull
Strategic Planning
Simon Wardley argues, serverless
changes computing into a
commodity like electricity. [3]
Required reading: Wardley Maps
Use cases
As a developer…
[7]
● Glue functionalities
● Smaller microservices
● High-volume functions
Use cases
As an operator…
[7]
● Provide the fundamentals of a self-service
platform
● Use spare capacity in existing
infrastructure
● Examine the internals
Functions
Functions
Containers
Google Cloud Run
● Fully managed
● Pick your infrastructure
● Loose container runtime contract
Knative
● 2 700+ ★ github.com/knative
● Latest stable release: v0.12.1
● v0.1.0 in July 2018
● The platform that powers Cloud Run
● Open source
● Knative on any cloud
1. Knative Build
2. Knative Serving
3. Knative Eventing
1. Knative Build
1. Knative Build
Build system that is designed to address a common need for
cloud native development.
Deprecated.
2. Knative Serving
2. Knative Serving
Serving provides scale-to-zero, request-driven compute
functionality. Essentially the execution and scaling components
of a serverless platform.[2]
Alternative to traditional Kubernetes svc, deployments, and hpa.
2. Knative Serving Resources
3. Knative Eventing
3. Knative Eventing
Eventing provides abstracted delivery and subscription
mechanisms which allow for building loosely-coupled and
event-driven serverless applications.[2]
3. Knative Eventing Resources
3. Knative Eventing Channels
GCP PubSub InMemoryChannel
KafkaChannel NatssChannel
Because the Broker requires a persistence layer...
3. Knative Eventing Sources
AWS SQS BitBucket Google Cloud Scheduler
Apache Camel Cron Job Kubernetes API
Apache Kafka GCP PubSub ...
The Broker can handle events from multiple sources of interest
CloudEvents
● 1 600+ ★ github.com/cloudevents/spec
● Latest stable release: v1.0
● v0.1 in April 2018
● A specification for describing event data in a common way.
● Ensure cross-service interoperability.
● Knative Eventing is consistent with the CloudEvents spec.
CloudEvent serialized as JSON
{
"specversion" : "1.0",
"type" : "com.github.pull.create",
"source" : "https://github.com/cloudevents/spec/pull",
"subject" : "123",
"id" : "A234-1234-1234",
"time" : "2018-04-05T17:31:00Z",
"comexampleextension1" : "value",
"comexampleothervalue" : 5,
"datacontenttype" : "text/xml",
"data" : "<much wow="xml"/>"
}
Let’s serve some HTTP
HTTP Events
Knative depends on an Ingress/Gateway which is capable of
routing HTTP requests to Knative Services.
The Ambassador Edge Stack
● 2 500+ ★ github.com/datawire/ambassador
● Latest stable release: v1.2.0
● v0.1.3 in April 2017
● API Gateway built on Envoy
● Open source
● Designed for Kubernetes
● Lives at the network edge to manage ingress traffic
Ambassador & Knative
Installing Knative with Ambassador gives us an alternative to
installing a service mesh for routing to applications with the
Knative Serving project.
Note that Istio is required for the Knative Eventing project.
Ambassador & Knative
.yaml
Internet traffic
Demo time!
Installation
Requires a Kubernetes cluster v1.15 or newer.
$ kubectl apply -f 
https://github.com/knative/serving/releases/download/v0.11.0/serving-crds.ya
ml
$ kubectl apply -f 
https://github.com/knative/serving/releases/download/v0.11.0/serving-core.ya
ml
$ kubectl apply -f 
https://getambassador.io/yaml/ambassador/ambassador-knative.yaml
$ kubectl apply -f 
https://getambassador.io/yaml/ambassador/ambassador-service.yaml
Deploy an application.yaml
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: helloworld-go
namespace: default
spec:
template:
spec:
containers:
- image: gcr.io/knative-samples/helloworld-go
env:
- name: TARGET
value: Go Sample v1
Voilà!
$ kubectl get ksvc helloworld-go
NAME URL LATESTCREATED
helloworld-go http://helloworld-go.default.example.com
helloworld-go-xkpfs
$ curl -v -H "Host: helloworld-go.default.example.com" <ambassador-ip>:80
< HTTP/1.1 200 OK
< content-length: 20
< content-type: text/plain; charset=utf-8
< x-envoy-upstream-service-time: 16
< server: envoy
<
Hello Go Sample v1!
End Result
Lightweight portable cloud-agnostic serverless platform.
Limitations
● Cold start
● Concurrency
● Resource consumption
Thanks!
Credits
[1] How Knative Can Unite Kubernetes and Serverless
[2] Knative: What is it and why should you care?
[3] Serverless Challenges We Need to Overcome
[4] Cloud Run
[5] Tutorial: Cloud-Agnostic Serverless - Sebastien Goasguen, TriggerMesh
[6] Installing Knative with Ambassador
[7] Self-Serverless: Why Run Knative Functions on Your Kubernetes Cluster?
[8] Knative Presentation from OSCON 2019 Portland, OR

Más contenido relacionado

La actualidad más candente

GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
Weaveworks
 

La actualidad más candente (20)

Workshop Azure DevOps Repos
Workshop Azure DevOps ReposWorkshop Azure DevOps Repos
Workshop Azure DevOps Repos
 
Kubernetes 1.21 release
Kubernetes 1.21 releaseKubernetes 1.21 release
Kubernetes 1.21 release
 
Choosing the right storage for stateful workloads on Kubernetes
Choosing the right storage for stateful workloads on KubernetesChoosing the right storage for stateful workloads on Kubernetes
Choosing the right storage for stateful workloads on Kubernetes
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
 
Kubestr browse2021.pptx
Kubestr browse2021.pptxKubestr browse2021.pptx
Kubestr browse2021.pptx
 
Distributed Storage in the Cloud
Distributed Storage in the CloudDistributed Storage in the Cloud
Distributed Storage in the Cloud
 
GitOps w/argocd
GitOps w/argocdGitOps w/argocd
GitOps w/argocd
 
JJUG CCC 2018 : Lessons Learned: Spring Cloud -> Docker -> Kubernetes
JJUG CCC 2018 : Lessons Learned: Spring Cloud ->  Docker -> KubernetesJJUG CCC 2018 : Lessons Learned: Spring Cloud ->  Docker -> Kubernetes
JJUG CCC 2018 : Lessons Learned: Spring Cloud -> Docker -> Kubernetes
 
GitOps is the best modern practice for CD with Kubernetes
GitOps is the best modern practice for CD with KubernetesGitOps is the best modern practice for CD with Kubernetes
GitOps is the best modern practice for CD with Kubernetes
 
Rehosting apps between k8s clusters and automating deployment using crane c...
Rehosting apps between k8s clusters and automating deployment using crane   c...Rehosting apps between k8s clusters and automating deployment using crane   c...
Rehosting apps between k8s clusters and automating deployment using crane c...
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
 
Continuous Everything in a Multi-cloud and Multi-platform Environment
Continuous Everything in a Multi-cloud and Multi-platform EnvironmentContinuous Everything in a Multi-cloud and Multi-platform Environment
Continuous Everything in a Multi-cloud and Multi-platform Environment
 
Building Cloud Native Applications Using Azure Kubernetes Service
Building Cloud Native Applications Using Azure Kubernetes ServiceBuilding Cloud Native Applications Using Azure Kubernetes Service
Building Cloud Native Applications Using Azure Kubernetes Service
 
Tectonic Summit 2016: Betting on Kubernetes
Tectonic Summit 2016: Betting on KubernetesTectonic Summit 2016: Betting on Kubernetes
Tectonic Summit 2016: Betting on Kubernetes
 
Kubernetes and the 12 factor cloud apps
Kubernetes and the 12 factor cloud appsKubernetes and the 12 factor cloud apps
Kubernetes and the 12 factor cloud apps
 
Building Resilient Cloud Native Apps in GKE
Building Resilient Cloud Native Apps in GKEBuilding Resilient Cloud Native Apps in GKE
Building Resilient Cloud Native Apps in GKE
 
Delivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsDelivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOps
 
GitOps - Modern best practices for high velocity app dev using cloud native t...
GitOps - Modern best practices for high velocity app dev using cloud native t...GitOps - Modern best practices for high velocity app dev using cloud native t...
GitOps - Modern best practices for high velocity app dev using cloud native t...
 
Managing serverless workloads with knative
Managing serverless workloads with knativeManaging serverless workloads with knative
Managing serverless workloads with knative
 
E bpf and profilers
E bpf and profilersE bpf and profilers
E bpf and profilers
 

Similar a [Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais

Similar a [Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais (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
 
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Cloud Native Islamabad - Getting Closer to Continuous Delivery with KnativeCloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
 
Serverless integration with Knative and Apache Camel on Kubernetes
Serverless integration with Knative and Apache Camel on KubernetesServerless integration with Knative and Apache Camel on Kubernetes
Serverless integration with Knative and Apache Camel on Kubernetes
 
Confluent Operator as Cloud-Native Kafka Operator for Kubernetes
Confluent Operator as Cloud-Native Kafka Operator for KubernetesConfluent Operator as Cloud-Native Kafka Operator for Kubernetes
Confluent Operator as Cloud-Native Kafka Operator for Kubernetes
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your way
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
 
Multi-Cloud Orchestration for Kubernetes with Cloudify - Webinar Presentation
Multi-Cloud Orchestration for Kubernetes with Cloudify - Webinar PresentationMulti-Cloud Orchestration for Kubernetes with Cloudify - Webinar Presentation
Multi-Cloud Orchestration for Kubernetes with Cloudify - Webinar Presentation
 
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
 
Multi-Cloud Orchestration for Kubernetes with Cloudify
Multi-Cloud Orchestration for Kubernetes with CloudifyMulti-Cloud Orchestration for Kubernetes with Cloudify
Multi-Cloud Orchestration for Kubernetes with Cloudify
 
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
 
Openshift serverless Solution
Openshift serverless SolutionOpenshift serverless Solution
Openshift serverless Solution
 
Kubernetes, Istio e Knative: The new cloud stack
Kubernetes, Istio e Knative: The new cloud stackKubernetes, Istio e Knative: The new cloud stack
Kubernetes, Istio e Knative: The new cloud stack
 
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
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
STANISLAV KOLENKIN, BAQ "K8S: network plugins - issues and performance compar...
STANISLAV KOLENKIN, BAQ "K8S: network plugins - issues and performance compar...STANISLAV KOLENKIN, BAQ "K8S: network plugins - issues and performance compar...
STANISLAV KOLENKIN, BAQ "K8S: network plugins - issues and performance compar...
 
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
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
 
Pivotal Container Service Overview
Pivotal Container Service Overview Pivotal Container Service Overview
Pivotal Container Service Overview
 

Más de Ambassador Labs

[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
Ambassador Labs
 

Más de Ambassador Labs (20)

Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
 
Cloud native development without the toil
Cloud native development without the toilCloud native development without the toil
Cloud native development without the toil
 
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services
 
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...
 
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
 
What's New in the Ambassador Edge Stack 1.0?
What's New in the Ambassador Edge Stack 1.0? What's New in the Ambassador Edge Stack 1.0?
What's New in the Ambassador Edge Stack 1.0?
 
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
 
Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy
 
Telepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for KubernetesTelepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for Kubernetes
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
 
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
 
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYCThe Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
 
Ambassador Kubernetes-Native API Gateway
Ambassador Kubernetes-Native API GatewayAmbassador Kubernetes-Native API Gateway
Ambassador Kubernetes-Native API Gateway
 
Micro xchg 2018 - What is a Service Mesh?
Micro xchg 2018 - What is a Service Mesh? Micro xchg 2018 - What is a Service Mesh?
Micro xchg 2018 - What is a Service Mesh?
 
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
 
Webinar: Code Faster on Kubernetes
Webinar: Code Faster on KubernetesWebinar: Code Faster on Kubernetes
Webinar: Code Faster on Kubernetes
 
QCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented DevelopmentQCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented Development
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
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 🔝✔️✔️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
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
 
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-...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais

  • 1. Build Your Own Serverless With Knative Alex Gervais ConFoo Montreal Feb. 27, 2020
  • 2. Bonjour-Hi! Outdoorsy, data-driven, eternal student, not so geeky creative mind and traveler. Alex is a curious, introverted and humble character. Working by day as a Senior Software Developer at Datawire he has many years of savoir-faire building full-stack systems from cloud infrastructures to backend services and DevOps tools. Alex is a Kubernetes early adopter who thrives on collaboration and contributor to many Cloud-Native projects. @alex_gervais on twitter alexgervais on github
  • 3. Table of Contents Why Serverless? Knative CloudEvents Up and running with the Ambassador Edge Stack
  • 4. Landscape ● Paradigms ● Cloud vendor solutions ● Runtime environment ● Abstractions
  • 5. Serverless ● Event-driven architectures ● Pay-per-use ● Servicefull
  • 6. Strategic Planning Simon Wardley argues, serverless changes computing into a commodity like electricity. [3] Required reading: Wardley Maps
  • 7. Use cases As a developer… [7] ● Glue functionalities ● Smaller microservices ● High-volume functions
  • 8. Use cases As an operator… [7] ● Provide the fundamentals of a self-service platform ● Use spare capacity in existing infrastructure ● Examine the internals
  • 12. Google Cloud Run ● Fully managed ● Pick your infrastructure ● Loose container runtime contract
  • 13. Knative ● 2 700+ ★ github.com/knative ● Latest stable release: v0.12.1 ● v0.1.0 in July 2018 ● The platform that powers Cloud Run ● Open source ● Knative on any cloud
  • 14. 1. Knative Build 2. Knative Serving 3. Knative Eventing
  • 16. 1. Knative Build Build system that is designed to address a common need for cloud native development. Deprecated.
  • 18. 2. Knative Serving Serving provides scale-to-zero, request-driven compute functionality. Essentially the execution and scaling components of a serverless platform.[2] Alternative to traditional Kubernetes svc, deployments, and hpa.
  • 19. 2. Knative Serving Resources
  • 21. 3. Knative Eventing Eventing provides abstracted delivery and subscription mechanisms which allow for building loosely-coupled and event-driven serverless applications.[2]
  • 22. 3. Knative Eventing Resources
  • 23. 3. Knative Eventing Channels GCP PubSub InMemoryChannel KafkaChannel NatssChannel Because the Broker requires a persistence layer...
  • 24. 3. Knative Eventing Sources AWS SQS BitBucket Google Cloud Scheduler Apache Camel Cron Job Kubernetes API Apache Kafka GCP PubSub ... The Broker can handle events from multiple sources of interest
  • 25. CloudEvents ● 1 600+ ★ github.com/cloudevents/spec ● Latest stable release: v1.0 ● v0.1 in April 2018 ● A specification for describing event data in a common way. ● Ensure cross-service interoperability. ● Knative Eventing is consistent with the CloudEvents spec.
  • 26. CloudEvent serialized as JSON { "specversion" : "1.0", "type" : "com.github.pull.create", "source" : "https://github.com/cloudevents/spec/pull", "subject" : "123", "id" : "A234-1234-1234", "time" : "2018-04-05T17:31:00Z", "comexampleextension1" : "value", "comexampleothervalue" : 5, "datacontenttype" : "text/xml", "data" : "<much wow="xml"/>" }
  • 28. HTTP Events Knative depends on an Ingress/Gateway which is capable of routing HTTP requests to Knative Services.
  • 29.
  • 30. The Ambassador Edge Stack ● 2 500+ ★ github.com/datawire/ambassador ● Latest stable release: v1.2.0 ● v0.1.3 in April 2017 ● API Gateway built on Envoy ● Open source ● Designed for Kubernetes ● Lives at the network edge to manage ingress traffic
  • 31. Ambassador & Knative Installing Knative with Ambassador gives us an alternative to installing a service mesh for routing to applications with the Knative Serving project. Note that Istio is required for the Knative Eventing project.
  • 34. Installation Requires a Kubernetes cluster v1.15 or newer. $ kubectl apply -f https://github.com/knative/serving/releases/download/v0.11.0/serving-crds.ya ml $ kubectl apply -f https://github.com/knative/serving/releases/download/v0.11.0/serving-core.ya ml $ kubectl apply -f https://getambassador.io/yaml/ambassador/ambassador-knative.yaml $ kubectl apply -f https://getambassador.io/yaml/ambassador/ambassador-service.yaml
  • 35. Deploy an application.yaml apiVersion: serving.knative.dev/v1alpha1 kind: Service metadata: name: helloworld-go namespace: default spec: template: spec: containers: - image: gcr.io/knative-samples/helloworld-go env: - name: TARGET value: Go Sample v1
  • 36. Voilà! $ kubectl get ksvc helloworld-go NAME URL LATESTCREATED helloworld-go http://helloworld-go.default.example.com helloworld-go-xkpfs $ curl -v -H "Host: helloworld-go.default.example.com" <ambassador-ip>:80 < HTTP/1.1 200 OK < content-length: 20 < content-type: text/plain; charset=utf-8 < x-envoy-upstream-service-time: 16 < server: envoy < Hello Go Sample v1!
  • 37. End Result Lightweight portable cloud-agnostic serverless platform.
  • 38. Limitations ● Cold start ● Concurrency ● Resource consumption
  • 40. Credits [1] How Knative Can Unite Kubernetes and Serverless [2] Knative: What is it and why should you care? [3] Serverless Challenges We Need to Overcome [4] Cloud Run [5] Tutorial: Cloud-Agnostic Serverless - Sebastien Goasguen, TriggerMesh [6] Installing Knative with Ambassador [7] Self-Serverless: Why Run Knative Functions on Your Kubernetes Cluster? [8] Knative Presentation from OSCON 2019 Portland, OR