SlideShare a Scribd company logo
Multi Cloud Serverless Platform
Using Kubernetes
Fahri YARDIMCI
Problem
- Vendor Lock-in
- Multi and/or Hybrid Cloud Serverless Platform
- Same stack of serverless on all cloud
Most used serverless platforms:
- AWS Lambda
- Azure Functions
- Google Cloud Functions
- Cloudflare Workers ..
Kubernetes
- We need a common platform
Kubernetes:
- Open Source
- Available as PaaS on most cloud providers
- AWS EKS, GKE, Azure AKS, DigitalOcean Kubernetes
How to manage Kubernetes Clusters Across World?
- We need some kind of automated, reliable control plane.
Kubernetes Federation v2:
- Managed by Multicluster-SIG community.
- Selecting master cluster to control all.
- Currently at v0.0.4 version (Still new but awesome).
How to create/run Serverless apps on Kubernetes?
- Now we managed worldwide clusters using Fed-v2. But how to serve
Serverless ?
Knative :
- Released in July 2018 at Google Cloud Next ‘18
- Scales to zero ! So you don’t need to reserve resources.
- Uses Istio as Service Mesh to make requests and autoscale works.
- Currently at version v0.2.2
Istio
Istio is a service mesh which has a lot of functionality.
Istio :
- Makes it so much easier to create blue/green deployments.
- Gives tracing and monitoring information easily.
- Manage containers networks basically.
- Security
- Ingress/Egress management.
*Still it needs some functionalities like ip whitelist per service/ingress
How do we Federate Knative?
- Kubernetes Federation uses their own crd for deploy all clusters.
- So we need to make Knative Serving Service CRD to federated.
- Lately Fed-v2 released kubefed federate tool for this :)
We need to push propagate KnativeService to FederatedKnativeService for
Federation Controller sends all clusters.
Why just federate Knative ?
- I can federate Istio as well but some clusters need additional
configuration like:
Cluster A: /regionA service its own traffic management
Cluster B: /regionB service its own traffic management
- It’s still doable federated placements and overrides but it unnecessary for
my project
Monitor Federation
Monitoring one cluster is easy and we can store it inside that cluster. But what
should i do with multi clusters.
I separated this to two part: Logs/Traces and Metrics.
Logs/Traces : Sending this to specially created cluster for just for this. So Asia
and US clusters send their logs to same place. Use separated index names like
EU1,USW1 ...
Pros: Log management is easy and showing/querying doesn’t need much
effort.
Cons: Latency… But still maximum 1~2 min delay for logs and traces.
Logs/Traces
I used ElasticSearch for store this data and Fluentd for collect and send to ES
Cluster.
ElasticSearch:
- Created at AWS Frankfurt with 3 node.
- Used v6.4.3
Fluentd:
- Cloud Native Collector.
- Sends to ES using logstash_format.
Logs/Traces
OpenZipkin:
- I used OpenZipkin for Collecting Traces
- OpenZipkin sends to ES Cluster.
Logs/Traces
- Diagram:
Metrics
Kubernetes pods and resource metrics i used Kube-state-metrics and
Prometheus with Grafana.
Kube-state-metrics:
- Using API Server to generate metrics
Prometheus:
- Store metrics
Grafana:
- Show metrics / graphs
Metrics
Showing users serverless apps metrics can be doable in 2 ways:
1. Make Prometheus cluster separate
2. Use reverse-proxy for grafana with authentication access using that
region with Kubernetes Loadbalancer - Istio Gateway
I choose second way because metric sending could be slow and alerting would
be wrong.
Metrics
Diagram:
-Nginx reverse
proxy with auth
-Kube
configmaps and
secrets
-Istio ingress
gateway
AWS RDS and S3
User and functions information stored in RDS Mysql db using AWS.
Codes stored in S3.
RDS:
- Managed and highly available Mysql instance
- Low cost and fast(comparing to mysql inside cluster)
S3:
- Managed storage service
- Fast and stores anything, any size.
How to build and push users functions/apps ?
Using Kaniko to build images for users code and push these images to GCR
(Google Container Registry)
Kaniko:
- Image builder inside Kubernetes.
- Doesn’t depends Docker.
Kubernetes Ops Using Python Flask and KubeClient
I used Python Client for Kubernetes related operations. It’s reasonably simple
compared to Java Client.
Python Flask:
- WebUI sends function and username uuid. This service runs knative and
push image to gcr using this format : fahritez/useruuid:functionuuid
- Creates namespace on master node.
- Deletes services
Diagram of creating Functions
S3 and GCR
Using userUUID and functionUUID for sending/retrieving and dns.
S3
GCR
Java Spring WebUI
Using this webUI user can do : register,create or delete function,show logs and
traces ,show metrics.
WebUI is responsible for:
- Inserting function informations to RDS
- Uploading user code with .tar.gz format to AWS S3
- Creating DNS Record on Route53 with latency-based routing
- Querying Elasticsearch
- Accessing Grafana with auth.
WebUI
Function fqdn is : functionuuid.useruuid.app.fahri.pw
Example :
http://f1cfca943-4807-470d-8e1c-1befddb437d9.285c5af8-3a7f-4a1a-bccd-4cf
b0ffe2c82.app.fahri.pw/
WebUI Create Function
- Taking env variables (these aren't stored to db or storage)
WebUI Traces
WebUI Metrics
Scale to zero works
Creating function using web ui and waiting to be scaling to zero.
Then making another request
WebUI Logs
Who am I
Fahri YARDIMCI
twitter.com/FahriYardimci
linkedin.com/in/fahriyardimci
Gazi University
Computer Engineering Student
Multi Cloud Serverless Platform
Using Kubernetes
Fahri YARDIMCI

More Related Content

What's hot

Serverless with Kubernetes
Serverless with KubernetesServerless with Kubernetes
Serverless with Kubernetes
Malepati Bala Siva Sai Akhil
 
A quick introduction to AKS
A quick introduction to AKSA quick introduction to AKS
A quick introduction to AKS
Alessandro Melchiori
 
Device status anomaly detection
Device status anomaly detectionDevice status anomaly detection
Device status anomaly detection
David Tung
 
Donabe-essex-conference-readout
Donabe-essex-conference-readoutDonabe-essex-conference-readout
Donabe-essex-conference-readout
Debojyoti Dutta
 
7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic
Kangaroot
 
Azure kubernetes service (aks) part 3
Azure kubernetes service (aks)   part 3Azure kubernetes service (aks)   part 3
Azure kubernetes service (aks) part 3
Nilesh Gule
 
Kubernetes and Amazon ECS
Kubernetes and Amazon ECSKubernetes and Amazon ECS
Kubernetes and Amazon ECS
Geert Pante
 
Helm chart-introduction
Helm chart-introductionHelm chart-introduction
Helm chart-introduction
Ganesh Pol
 
How do we use Kubernetes
How do we use KubernetesHow do we use Kubernetes
How do we use Kubernetes
Uri Savelchev
 
AWS Containerization
AWS ContainerizationAWS Containerization
AWS Containerization
Mackenzie LeJeune
 
5 lessons learned for Successful Migration to Confluent Cloud
5 lessons learned for  Successful Migration to Confluent Cloud5 lessons learned for  Successful Migration to Confluent Cloud
5 lessons learned for Successful Migration to Confluent Cloud
Natan Silnitsky
 
Nested Beanstalk Deployment - Brett Sutter, Minneapolis
 Nested Beanstalk Deployment - Brett Sutter, Minneapolis Nested Beanstalk Deployment - Brett Sutter, Minneapolis
Nested Beanstalk Deployment - Brett Sutter, Minneapolis
AWS Chicago
 
CloudAnts - Kubernetes
CloudAnts - KubernetesCloudAnts - Kubernetes
CloudAnts - Kubernetes
Aron Beurskens
 
[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API
Lakmal Warusawithana
 
Elasticsearch @ Keboola
Elasticsearch @ KeboolaElasticsearch @ Keboola
Elasticsearch @ Keboola
Martin Halamíček
 
Abiquo 2.0 from 1000 feet
Abiquo 2.0 from 1000 feetAbiquo 2.0 from 1000 feet
Abiquo 2.0 from 1000 feet
abiquo labs
 
9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day
Kimihiko Kitase
 
Virtual kubelet
Virtual kubeletVirtual kubelet
Virtual kubelet
Sanket Sudake
 
Kubernetes + netflix oss
Kubernetes + netflix ossKubernetes + netflix oss
Kubernetes + netflix oss
Cristiano Altmann
 

What's hot (20)

Serverless with Kubernetes
Serverless with KubernetesServerless with Kubernetes
Serverless with Kubernetes
 
A quick introduction to AKS
A quick introduction to AKSA quick introduction to AKS
A quick introduction to AKS
 
History Of Couch Db
History Of Couch DbHistory Of Couch Db
History Of Couch Db
 
Device status anomaly detection
Device status anomaly detectionDevice status anomaly detection
Device status anomaly detection
 
Donabe-essex-conference-readout
Donabe-essex-conference-readoutDonabe-essex-conference-readout
Donabe-essex-conference-readout
 
7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic
 
Azure kubernetes service (aks) part 3
Azure kubernetes service (aks)   part 3Azure kubernetes service (aks)   part 3
Azure kubernetes service (aks) part 3
 
Kubernetes and Amazon ECS
Kubernetes and Amazon ECSKubernetes and Amazon ECS
Kubernetes and Amazon ECS
 
Helm chart-introduction
Helm chart-introductionHelm chart-introduction
Helm chart-introduction
 
How do we use Kubernetes
How do we use KubernetesHow do we use Kubernetes
How do we use Kubernetes
 
AWS Containerization
AWS ContainerizationAWS Containerization
AWS Containerization
 
5 lessons learned for Successful Migration to Confluent Cloud
5 lessons learned for  Successful Migration to Confluent Cloud5 lessons learned for  Successful Migration to Confluent Cloud
5 lessons learned for Successful Migration to Confluent Cloud
 
Nested Beanstalk Deployment - Brett Sutter, Minneapolis
 Nested Beanstalk Deployment - Brett Sutter, Minneapolis Nested Beanstalk Deployment - Brett Sutter, Minneapolis
Nested Beanstalk Deployment - Brett Sutter, Minneapolis
 
CloudAnts - Kubernetes
CloudAnts - KubernetesCloudAnts - Kubernetes
CloudAnts - Kubernetes
 
[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API
 
Elasticsearch @ Keboola
Elasticsearch @ KeboolaElasticsearch @ Keboola
Elasticsearch @ Keboola
 
Abiquo 2.0 from 1000 feet
Abiquo 2.0 from 1000 feetAbiquo 2.0 from 1000 feet
Abiquo 2.0 from 1000 feet
 
9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day
 
Virtual kubelet
Virtual kubeletVirtual kubelet
Virtual kubelet
 
Kubernetes + netflix oss
Kubernetes + netflix ossKubernetes + netflix oss
Kubernetes + netflix oss
 

Similar to Multi cloud Serverless platform using Kubernetes

Lessons learned migrating 100+ services to Kubernetes
Lessons learned migrating 100+ services to KubernetesLessons learned migrating 100+ services to Kubernetes
Lessons learned migrating 100+ services to Kubernetes
Jose Galarza
 
Kubernetes-Fundamentals.pptx
Kubernetes-Fundamentals.pptxKubernetes-Fundamentals.pptx
Kubernetes-Fundamentals.pptx
satish642065
 
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless  - Serverless Summit 2017 - Krishna KumarKubernetes for Serverless  - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
CodeOps Technologies LLP
 
Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)
Krishna-Kumar
 
Load Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLoad Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & Kubernetes
Lee Calcote
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...
AWS User Group Kochi
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
Ajeet Singh
 
Netflix and Containers: Not A Stranger Thing
Netflix and Containers:  Not A Stranger ThingNetflix and Containers:  Not A Stranger Thing
Netflix and Containers: Not A Stranger Thing
aspyker
 
Netflix and Containers: Not Stranger Things
Netflix and Containers: Not Stranger ThingsNetflix and Containers: Not Stranger Things
Netflix and Containers: Not Stranger Things
All Things Open
 
Bitbucket Pipelines - Powered by Kubernetes
Bitbucket Pipelines - Powered by KubernetesBitbucket Pipelines - Powered by Kubernetes
Bitbucket Pipelines - Powered by Kubernetes
Nathan Burrell
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
Terry Cho
 
Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Netflix oss season 1 episode 3
Netflix oss season 1 episode 3
Ruslan Meshenberg
 
Kubernetes Immersion
Kubernetes ImmersionKubernetes Immersion
Kubernetes Immersion
Juan Larriba
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Wojciech Barczyński
 
Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetes
Elad Hirsch
 
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Codemotion
 
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Codemotion
 
1. CNCF kubernetes meetup - Ondrej Sika
1. CNCF kubernetes meetup - Ondrej Sika1. CNCF kubernetes meetup - Ondrej Sika
1. CNCF kubernetes meetup - Ondrej Sika
Juraj Hantak
 
Kubernetes: Managed or Not Managed?
Kubernetes: Managed or Not Managed?Kubernetes: Managed or Not Managed?
Kubernetes: Managed or Not Managed?
Mathieu Herbert
 

Similar to Multi cloud Serverless platform using Kubernetes (20)

Lessons learned migrating 100+ services to Kubernetes
Lessons learned migrating 100+ services to KubernetesLessons learned migrating 100+ services to Kubernetes
Lessons learned migrating 100+ services to Kubernetes
 
Kubernetes-Fundamentals.pptx
Kubernetes-Fundamentals.pptxKubernetes-Fundamentals.pptx
Kubernetes-Fundamentals.pptx
 
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless  - Serverless Summit 2017 - Krishna KumarKubernetes for Serverless  - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
 
Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)Why kubernetes for Serverless (FaaS)
Why kubernetes for Serverless (FaaS)
 
Load Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLoad Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & Kubernetes
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
 
Netflix and Containers: Not A Stranger Thing
Netflix and Containers:  Not A Stranger ThingNetflix and Containers:  Not A Stranger Thing
Netflix and Containers: Not A Stranger Thing
 
Netflix and Containers: Not Stranger Things
Netflix and Containers: Not Stranger ThingsNetflix and Containers: Not Stranger Things
Netflix and Containers: Not Stranger Things
 
Bitbucket Pipelines - Powered by Kubernetes
Bitbucket Pipelines - Powered by KubernetesBitbucket Pipelines - Powered by Kubernetes
Bitbucket Pipelines - Powered by Kubernetes
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Netflix oss season 1 episode 3
Netflix oss season 1 episode 3
 
Kubernetes Immersion
Kubernetes ImmersionKubernetes Immersion
Kubernetes Immersion
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
 
Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetes
 
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
 
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
 
1. CNCF kubernetes meetup - Ondrej Sika
1. CNCF kubernetes meetup - Ondrej Sika1. CNCF kubernetes meetup - Ondrej Sika
1. CNCF kubernetes meetup - Ondrej Sika
 
Kubernetes: Managed or Not Managed?
Kubernetes: Managed or Not Managed?Kubernetes: Managed or Not Managed?
Kubernetes: Managed or Not Managed?
 

Recently uploaded

Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 

Recently uploaded (20)

Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 

Multi cloud Serverless platform using Kubernetes

  • 1. Multi Cloud Serverless Platform Using Kubernetes Fahri YARDIMCI
  • 2. Problem - Vendor Lock-in - Multi and/or Hybrid Cloud Serverless Platform - Same stack of serverless on all cloud Most used serverless platforms: - AWS Lambda - Azure Functions - Google Cloud Functions - Cloudflare Workers ..
  • 3. Kubernetes - We need a common platform Kubernetes: - Open Source - Available as PaaS on most cloud providers - AWS EKS, GKE, Azure AKS, DigitalOcean Kubernetes
  • 4. How to manage Kubernetes Clusters Across World? - We need some kind of automated, reliable control plane. Kubernetes Federation v2: - Managed by Multicluster-SIG community. - Selecting master cluster to control all. - Currently at v0.0.4 version (Still new but awesome).
  • 5. How to create/run Serverless apps on Kubernetes? - Now we managed worldwide clusters using Fed-v2. But how to serve Serverless ? Knative : - Released in July 2018 at Google Cloud Next ‘18 - Scales to zero ! So you don’t need to reserve resources. - Uses Istio as Service Mesh to make requests and autoscale works. - Currently at version v0.2.2
  • 6. Istio Istio is a service mesh which has a lot of functionality. Istio : - Makes it so much easier to create blue/green deployments. - Gives tracing and monitoring information easily. - Manage containers networks basically. - Security - Ingress/Egress management. *Still it needs some functionalities like ip whitelist per service/ingress
  • 7. How do we Federate Knative? - Kubernetes Federation uses their own crd for deploy all clusters. - So we need to make Knative Serving Service CRD to federated. - Lately Fed-v2 released kubefed federate tool for this :) We need to push propagate KnativeService to FederatedKnativeService for Federation Controller sends all clusters.
  • 8. Why just federate Knative ? - I can federate Istio as well but some clusters need additional configuration like: Cluster A: /regionA service its own traffic management Cluster B: /regionB service its own traffic management - It’s still doable federated placements and overrides but it unnecessary for my project
  • 9. Monitor Federation Monitoring one cluster is easy and we can store it inside that cluster. But what should i do with multi clusters. I separated this to two part: Logs/Traces and Metrics. Logs/Traces : Sending this to specially created cluster for just for this. So Asia and US clusters send their logs to same place. Use separated index names like EU1,USW1 ... Pros: Log management is easy and showing/querying doesn’t need much effort. Cons: Latency… But still maximum 1~2 min delay for logs and traces.
  • 10. Logs/Traces I used ElasticSearch for store this data and Fluentd for collect and send to ES Cluster. ElasticSearch: - Created at AWS Frankfurt with 3 node. - Used v6.4.3 Fluentd: - Cloud Native Collector. - Sends to ES using logstash_format.
  • 11. Logs/Traces OpenZipkin: - I used OpenZipkin for Collecting Traces - OpenZipkin sends to ES Cluster.
  • 13. Metrics Kubernetes pods and resource metrics i used Kube-state-metrics and Prometheus with Grafana. Kube-state-metrics: - Using API Server to generate metrics Prometheus: - Store metrics Grafana: - Show metrics / graphs
  • 14. Metrics Showing users serverless apps metrics can be doable in 2 ways: 1. Make Prometheus cluster separate 2. Use reverse-proxy for grafana with authentication access using that region with Kubernetes Loadbalancer - Istio Gateway I choose second way because metric sending could be slow and alerting would be wrong.
  • 15. Metrics Diagram: -Nginx reverse proxy with auth -Kube configmaps and secrets -Istio ingress gateway
  • 16. AWS RDS and S3 User and functions information stored in RDS Mysql db using AWS. Codes stored in S3. RDS: - Managed and highly available Mysql instance - Low cost and fast(comparing to mysql inside cluster) S3: - Managed storage service - Fast and stores anything, any size.
  • 17. How to build and push users functions/apps ? Using Kaniko to build images for users code and push these images to GCR (Google Container Registry) Kaniko: - Image builder inside Kubernetes. - Doesn’t depends Docker.
  • 18. Kubernetes Ops Using Python Flask and KubeClient I used Python Client for Kubernetes related operations. It’s reasonably simple compared to Java Client. Python Flask: - WebUI sends function and username uuid. This service runs knative and push image to gcr using this format : fahritez/useruuid:functionuuid - Creates namespace on master node. - Deletes services
  • 19. Diagram of creating Functions
  • 20. S3 and GCR Using userUUID and functionUUID for sending/retrieving and dns. S3 GCR
  • 21. Java Spring WebUI Using this webUI user can do : register,create or delete function,show logs and traces ,show metrics. WebUI is responsible for: - Inserting function informations to RDS - Uploading user code with .tar.gz format to AWS S3 - Creating DNS Record on Route53 with latency-based routing - Querying Elasticsearch - Accessing Grafana with auth.
  • 22. WebUI Function fqdn is : functionuuid.useruuid.app.fahri.pw Example : http://f1cfca943-4807-470d-8e1c-1befddb437d9.285c5af8-3a7f-4a1a-bccd-4cf b0ffe2c82.app.fahri.pw/
  • 23. WebUI Create Function - Taking env variables (these aren't stored to db or storage)
  • 26. Scale to zero works Creating function using web ui and waiting to be scaling to zero. Then making another request
  • 28. Who am I Fahri YARDIMCI twitter.com/FahriYardimci linkedin.com/in/fahriyardimci Gazi University Computer Engineering Student
  • 29. Multi Cloud Serverless Platform Using Kubernetes Fahri YARDIMCI