Upload
sebastien-goasguen
View
287
Download
2
Embed Size (px)
Citation preview
Serverless on Kubernetes
Sebastien Goasguen@sebgoa
www.skippbox.com
DON’T DISMISSForget the buzz, the FUD….
How I dismissed EC2:
Did not dismiss Docker and won’t dismiss Serverless
DON’T GET HANG UP ON THE NAME
Naming is hard they say...
Via Twitter from Serverless Austin…
Don’t mind the hype
Forget the hype focus on adoption
Definition
“Serverless can also mean applications where some amount of server-side logic is still written by the application developer but unlike traditional architectures is run in stateless compute containers that are event-triggered, ephemeral (may only last for one invocation), and fully managed by a 3rd party”
--Mike Roberts (https://martinfowler.com/articles/serverless.html)
Knitting services together through functions
https://aws.amazon.com/lambda/
Lambda examples:
IFTTT
Solutions
WHY THE FUSS ABOUT SERVERLESS ?
From @swardleyhttp://blog.gardeviance.org/2016/11/why-fuss-about-serverless.htmlAll maps hereafter are from Simon.
Value Chain and Evolution
Co-evolution
• As infrastructure and platform evolve towards utility
• So does Practice…it evolves.
• So imagine a pure Cloud world, with third party services, how do you stitch them together ?
• What does it trigger ?
“Worth based development” @swardley
• “FinDev”• FaaS gives you fine grain cost monitoring.
• Develop and optimize for cost/business
100% “DevOps”Focus on the biz, Go fast.
WHY KUBELESSServerless on Kubernetes
#1 Borg
#2 Change Mindset
• Everything is remote API driven– Deployments– Config– Volume mgt, RBAC …
• No SSH– I don’t care about servers anymore
• Containers are invisible• Brings focus on application architecture
KUBELESS ARCHITECTUREgithub.com/skippbox/kubeless
Leverage kubernetes
• ThirdPartyResource, gives us CRUD for functions
• Watch via a controller• Inject the function code via a ConfigMap• Kafka/Zookeeper for events
kubeless install
• Creates thirdpartyresource for CRUD of functions
• Creates a kubeless namespace• Launches controller as a deployment• Launches a Kafka/Zookeeper deployment
Lamba-k8s.io$ kubectl get thirdpartyresource lamb-da.k8s.io -o yaml
apiVersion: extensions/v1beta1description: 'Kubeless: Serverless framework for Kubernetes'kind: ThirdPartyResourcemetadata: creationTimestamp: 2017-02-02T14:30:20Z name: lamb-da.k8s.io resourceVersion: "54958" selfLink: /apis/extensions/v1beta1/thirdpartyresourceslamb-da.k8s.io uid: 203ddb53-e954-11e6-a0da-080027b57baeversions:- name: v1
kubeless create
• Creates custom resource (with thirdparty endpoint)
• Controllers creates deployment and service• Pod starts containers with REST wrapper• Function injected in runtime via configmap
Event based
• Topic created via kubeless CLI on Kafka broker• Specific runtime consumes messages on given
topic
DEMO
kubeless function create get \--trigger-http \--runtime \--handler \--from-file
kubeless roadmap
• Add new runtime (e.g nodejs)• Use Ingress resources• Instrument the runtime with prometheus for
monitoring• Horizontal Pod Autoscaling• Default services with event notification (e.g
Minio).
Kubernetes Services
• Deploy Services (backends) via helm
helm install stable/minio
• Access Services via the Service Broker API.
CONCLUSIONSgithub.com/skippbox/kubeless
Thanks
Respect each other…Don’t dismiss it …Evolve …Situational awareness …Focus on the business problem and deliver value…
@sebgoagithub.com/skippbox/kubeless