SlideShare une entreprise Scribd logo
1  sur  25
Kubernetes
and the Rise of
Application-centric Computing
Angus Lees <gus@bitnami.com>
Why
The Software Stack
Your Code
Framework
Language
Software Distribution
OS/Kernel
CPU
Physical Enclosure
Electricity/Cooling
Maturity CurveRisk
Novelty
ExperimentationCommoditisation Maturation
Open-Source dominates here
Businesses want to be here
Maturity CurveRisk
Novelty
Niche/CrazyBoring Interesting
The Server-Side Software Stack
Your Code
Framework
Language
Software Distribution
OS/Kernel
CPU
Physical Enclosure
Electricity/Cooling
Boring infrastructure
Interesting 3rd-party
choices
Your actual problem
Somewhere here
Introducing Kubernetes
• Cluster orchestrator/manager
• Often abbreviated to “k8s”
• Runs jobs in containers (usually Docker images) - no VM overhead
• Originally created/released by Google based on internal experience
• Vibrant Free Software project (Apache2 license)
• Application-centric focus
Application-centric
You tell Kubernetes:
• Application executable, required libraries (as a docker image)
• Command line arguments, environment variables
• Config files
• Application health checks
• (Optionally) memory/cpu requirements, scheduling hints
... and Kubernetes does everything else
… with Kubernetes + Docker
Your Code
Framework
Language
Software Distribution
OS/Kernel
CPU
Physical Enclosure
Electricity/Cooling
Boring infrastructure
Interesting 3rd-party
choices
Your actual problem
Somewhere here
Application-Centric Computing
Before: After Kubernetes+Docker:
✓ Where to run
✓ How to run
✓ How to upgrade
✓ Recovering from failures
Interesting: Orchestration
Boring: Hardware
Interesting: Applications
Boring: Everything else
Kubernetes
Now boring is “how”, and
interesting is “what”
What
Declarative Configuration
• Say what not how
• Install/upgrade/downgrade is
all derived from single config
• Allows for strong tooling
ecosystem
• No mention of host details,
VMs, network topology, etc
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 3
template:
metadata:
labels:
app: guestbook
tier: frontend
spec:
containers:
- name: php-redis
image: gcr.io/google-samples/gb-frontend:v4
resources:
requests:
cpu: 100m
memory: 100Mi
env:
- name: GET_HOSTS_FROM
value: dns
ports:
- containerPort: 80
Building Blocks
Most common:
• Pod - group of containers that always run together
• Deployment - describes a number of replicas of a pod
• Service - exposes several pods as a single load-balanced entity
• PersistentVolume - abstraction over network attached storage
• ConfigMap - configuration made available to pods
• Secret - like ConfigMap, but assumed to contain sensitive material
Internal Architecture
… with Kubernetes + Docker
Your Code
Framework
Language
Software Distribution
OS/Kernel
CPU
Physical Enclosure
Electricity/Cooling
Boring infrastructure
Interesting 3rd-party
choices
Your actual problem
Somewhere here
Functions aim to be general purpose infrastructure, unlike PaaS.
Functions raise the level of “boring”, into your application.
#!Boring
boring(boring)
boring
# Boring boring
boring boring(boring):
--> Your code goes here <--
Boring(boring) -> boring;
boring {{boring.boring}}
Next? Functions as a Service
Highlight: Kubeless
• Kubernetes native - designed specifically for Kubernetes
• Simple - reuses existing Kubernetes pieces wherever possible
• Node.js, Python, Ruby and more on the way
• Open Source project, led by Bitnami
• Get prometheus metrics, error handling, etc for free from runtime,
you just provide the “do work” function
Example: Automatic Thumbnail Creation
#!python
# (Some imports and global variable declarations elided)
def thumbnail(context):
bucket = os.path.dirname(context['Key'])
_, file_extension = os.path.splitext(context['Key'])
filename = os.path.basename(context['Key'])
if file_extension.upper() != ".JPEG":
return "Not a picture"
if context['EventType'] == "s3:ObjectCreated:Put" and bucket == 'foobar':
tf = tempfile.NamedTemporaryFile()
tf_thumb = tempfile.NamedTemporaryFile()
client.fget_object(bucket, filename, tf.name)
img = Image.open(tf.name)
img.thumbnail((120,120))
img.save(tf_thumb.name, "JPEG")
# puts the thumbnail in a thumbnail bucket
client.fput_object('thumb', thumb_name = filename + '.thumb', tf_thumb.name)
return "Thumbnail creation triggered"
Minio (an object store) configured to send notifications to kafka pubsub.
Install function:
% kubeless function deploy thumb1 
--trigger-topic s3 
--runtime python2.7 
--handler resize.thumbnail 
--from-file resize.py 
--dependencies requirements.txt
Done.
Example: Automatic Thumbnail Creation
kubeless-ui
Behind the scenes, Kubeless builds:
Example: Automatic Thumbnail Creation
Function
ThirdParty
Resource
Service
(for HTTP
triggers)
ConfigMap
Deployment
kubeless
client or
kubectl
Code
Code
https://kubernetes.io
Local Kubernetes experiments: minikube
Kubernetes on Oracle Cloud Platform How-To:
https://docs.bitnami.com/kubernetes/how-to/set-kubernetes-cluster-oracle/
http://kubeless.io/
Next Steps
Thank You

Contenu connexe

Tendances

Cost-effective Compute Clusters with Spot and Pre-emptible Instances - KubeCo...
Cost-effective Compute Clusters with Spot and Pre-emptible Instances - KubeCo...Cost-effective Compute Clusters with Spot and Pre-emptible Instances - KubeCo...
Cost-effective Compute Clusters with Spot and Pre-emptible Instances - KubeCo...
Platform9
 
How kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedHow kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updated
Shikha Srivastava
 

Tendances (20)

KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLINGKUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
 
A Million ways of Deploying a Kubernetes Cluster
A Million ways of Deploying a Kubernetes ClusterA Million ways of Deploying a Kubernetes Cluster
A Million ways of Deploying a Kubernetes Cluster
 
Knative And Pivotal Function As a Service
Knative And Pivotal Function As a ServiceKnative And Pivotal Function As a Service
Knative And Pivotal Function As a Service
 
Kubernetes Helm: Why It Matters
Kubernetes Helm: Why It MattersKubernetes Helm: Why It Matters
Kubernetes Helm: Why It Matters
 
Why kubernetes matters
Why kubernetes mattersWhy kubernetes matters
Why kubernetes matters
 
Gdsc muk - innocent
Gdsc   muk - innocentGdsc   muk - innocent
Gdsc muk - innocent
 
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
How to Live in a Post-Spring-Cloud-Netflix World - Olga Maciaszek-Sharma & Ja...
 
Introduction to helm
Introduction to helmIntroduction to helm
Introduction to helm
 
How to contribute to cloud native computing foundation (CNCF)
How to contribute to cloud native computing foundation (CNCF)How to contribute to cloud native computing foundation (CNCF)
How to contribute to cloud native computing foundation (CNCF)
 
Top 5 Considerations for Successful Deployment of Kubernetes
Top 5 Considerations for Successful Deployment of KubernetesTop 5 Considerations for Successful Deployment of Kubernetes
Top 5 Considerations for Successful Deployment of Kubernetes
 
Cost-effective Compute Clusters with Spot and Pre-emptible Instances - KubeCo...
Cost-effective Compute Clusters with Spot and Pre-emptible Instances - KubeCo...Cost-effective Compute Clusters with Spot and Pre-emptible Instances - KubeCo...
Cost-effective Compute Clusters with Spot and Pre-emptible Instances - KubeCo...
 
Adopting containers and kubernetes in production
Adopting containers and kubernetes in productionAdopting containers and kubernetes in production
Adopting containers and kubernetes in production
 
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
 
Intro to GKE and app deployment with Kubernetes
Intro to GKE and app deployment with KubernetesIntro to GKE and app deployment with Kubernetes
Intro to GKE and app deployment with Kubernetes
 
DevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with AzureDevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with Azure
 
Azure kubernetes service (aks)
Azure kubernetes service (aks)Azure kubernetes service (aks)
Azure kubernetes service (aks)
 
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...
KubeCon China 2019 - Building Apps with Containers, Functions and Managed Ser...
 
How kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedHow kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updated
 
6 Things You Need to Know to Safely Run Kubernetes
6 Things You Need to Know to Safely Run Kubernetes6 Things You Need to Know to Safely Run Kubernetes
6 Things You Need to Know to Safely Run Kubernetes
 
Building Developer Pipelines with PKS, Harbor, Clair, and Concourse
Building Developer Pipelines with PKS, Harbor, Clair, and ConcourseBuilding Developer Pipelines with PKS, Harbor, Clair, and Concourse
Building Developer Pipelines with PKS, Harbor, Clair, and Concourse
 

Similaire à Kubernetes and the Rise of Application-centric Computing

Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
Sébastien Le Gall
 

Similaire à Kubernetes and the Rise of Application-centric Computing (20)

Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Adf with docker
Adf with dockerAdf with docker
Adf with docker
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
 
Why do we even have Kubernetes?
Why do we even have Kubernetes?Why do we even have Kubernetes?
Why do we even have Kubernetes?
 
.NET Core: a new .NET Platform
.NET Core: a new .NET Platform.NET Core: a new .NET Platform
.NET Core: a new .NET Platform
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
 
DevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarDevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm Webinar
 
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV ClusterMethod of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
Where should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and moreWhere should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and more
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Kubernetes deployment on bare metal with container linux
Kubernetes deployment on bare metal with container linuxKubernetes deployment on bare metal with container linux
Kubernetes deployment on bare metal with container linux
 
Gordon's secret session kubernetes on windows
Gordon's secret session   kubernetes on windowsGordon's secret session   kubernetes on windows
Gordon's secret session kubernetes on windows
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
DevOps for Databricks
DevOps for DatabricksDevOps for Databricks
DevOps for Databricks
 
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
 

Plus de Bitnami

Plus de Bitnami (6)

Deploying a Java Application on Azure Kubernetes Service with Cosmos DB
Deploying a Java Application on Azure Kubernetes Service with Cosmos DBDeploying a Java Application on Azure Kubernetes Service with Cosmos DB
Deploying a Java Application on Azure Kubernetes Service with Cosmos DB
 
Continous Delivery to Kubernetes using Helm
Continous Delivery to Kubernetes using HelmContinous Delivery to Kubernetes using Helm
Continous Delivery to Kubernetes using Helm
 
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
 
Contenedores y el Futuro del Despliegue de Aplicaciones
Contenedores y el Futuro del Despliegue de AplicacionesContenedores y el Futuro del Despliegue de Aplicaciones
Contenedores y el Futuro del Despliegue de Aplicaciones
 
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
 
Banishing the Shadow Cloud
Banishing the Shadow CloudBanishing the Shadow Cloud
Banishing the Shadow Cloud
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

Kubernetes and the Rise of Application-centric Computing

  • 1.
  • 2. Kubernetes and the Rise of Application-centric Computing Angus Lees <gus@bitnami.com>
  • 3. Why
  • 4. The Software Stack Your Code Framework Language Software Distribution OS/Kernel CPU Physical Enclosure Electricity/Cooling
  • 7. The Server-Side Software Stack Your Code Framework Language Software Distribution OS/Kernel CPU Physical Enclosure Electricity/Cooling Boring infrastructure Interesting 3rd-party choices Your actual problem Somewhere here
  • 8. Introducing Kubernetes • Cluster orchestrator/manager • Often abbreviated to “k8s” • Runs jobs in containers (usually Docker images) - no VM overhead • Originally created/released by Google based on internal experience • Vibrant Free Software project (Apache2 license) • Application-centric focus
  • 9. Application-centric You tell Kubernetes: • Application executable, required libraries (as a docker image) • Command line arguments, environment variables • Config files • Application health checks • (Optionally) memory/cpu requirements, scheduling hints ... and Kubernetes does everything else
  • 10. … with Kubernetes + Docker Your Code Framework Language Software Distribution OS/Kernel CPU Physical Enclosure Electricity/Cooling Boring infrastructure Interesting 3rd-party choices Your actual problem Somewhere here
  • 11. Application-Centric Computing Before: After Kubernetes+Docker: ✓ Where to run ✓ How to run ✓ How to upgrade ✓ Recovering from failures Interesting: Orchestration Boring: Hardware Interesting: Applications Boring: Everything else
  • 12. Kubernetes Now boring is “how”, and interesting is “what”
  • 13. What
  • 14. Declarative Configuration • Say what not how • Install/upgrade/downgrade is all derived from single config • Allows for strong tooling ecosystem • No mention of host details, VMs, network topology, etc apiVersion: extensions/v1beta1 kind: Deployment metadata: name: frontend spec: replicas: 3 template: metadata: labels: app: guestbook tier: frontend spec: containers: - name: php-redis image: gcr.io/google-samples/gb-frontend:v4 resources: requests: cpu: 100m memory: 100Mi env: - name: GET_HOSTS_FROM value: dns ports: - containerPort: 80
  • 15. Building Blocks Most common: • Pod - group of containers that always run together • Deployment - describes a number of replicas of a pod • Service - exposes several pods as a single load-balanced entity • PersistentVolume - abstraction over network attached storage • ConfigMap - configuration made available to pods • Secret - like ConfigMap, but assumed to contain sensitive material
  • 17. … with Kubernetes + Docker Your Code Framework Language Software Distribution OS/Kernel CPU Physical Enclosure Electricity/Cooling Boring infrastructure Interesting 3rd-party choices Your actual problem Somewhere here
  • 18. Functions aim to be general purpose infrastructure, unlike PaaS. Functions raise the level of “boring”, into your application. #!Boring boring(boring) boring # Boring boring boring boring(boring): --> Your code goes here <-- Boring(boring) -> boring; boring {{boring.boring}} Next? Functions as a Service
  • 19. Highlight: Kubeless • Kubernetes native - designed specifically for Kubernetes • Simple - reuses existing Kubernetes pieces wherever possible • Node.js, Python, Ruby and more on the way • Open Source project, led by Bitnami • Get prometheus metrics, error handling, etc for free from runtime, you just provide the “do work” function
  • 20. Example: Automatic Thumbnail Creation #!python # (Some imports and global variable declarations elided) def thumbnail(context): bucket = os.path.dirname(context['Key']) _, file_extension = os.path.splitext(context['Key']) filename = os.path.basename(context['Key']) if file_extension.upper() != ".JPEG": return "Not a picture" if context['EventType'] == "s3:ObjectCreated:Put" and bucket == 'foobar': tf = tempfile.NamedTemporaryFile() tf_thumb = tempfile.NamedTemporaryFile() client.fget_object(bucket, filename, tf.name) img = Image.open(tf.name) img.thumbnail((120,120)) img.save(tf_thumb.name, "JPEG") # puts the thumbnail in a thumbnail bucket client.fput_object('thumb', thumb_name = filename + '.thumb', tf_thumb.name) return "Thumbnail creation triggered"
  • 21. Minio (an object store) configured to send notifications to kafka pubsub. Install function: % kubeless function deploy thumb1 --trigger-topic s3 --runtime python2.7 --handler resize.thumbnail --from-file resize.py --dependencies requirements.txt Done. Example: Automatic Thumbnail Creation
  • 23. Behind the scenes, Kubeless builds: Example: Automatic Thumbnail Creation Function ThirdParty Resource Service (for HTTP triggers) ConfigMap Deployment kubeless client or kubectl Code Code
  • 24. https://kubernetes.io Local Kubernetes experiments: minikube Kubernetes on Oracle Cloud Platform How-To: https://docs.bitnami.com/kubernetes/how-to/set-kubernetes-cluster-oracle/ http://kubeless.io/ Next Steps