provectus.com
Serverless technologies with
Kubernetes
• What’s serverless and what it has to do with DevOps?
• Serverless overview/Competing products
• Funktion by RedHat
• Kubeless
• Fission
• Questions
provectus.com
Provectus – международная R&D компания, предоставляющая полный комплекс услуг по
разработке программного обеспечения для корпоративного сегмента, мобильных платформ и
WEB по всему миру.
Palo Alto, California, USA
Odesa, Ukraine
Kazan, Russia
Kyiv, Ukraine
provectus.com
Mobile & Design eCommerce DevOps & Big data
Where talents met opportunity
provectus.com
Stanislav Ivashchenko
Senior Operations Analyst/DevOps engineer
provectus.com
What is serverless?
1. Function-as-a-service (Stateless)
2. Event-driven
3. Infrastructure is allocated and managed dynamically
4. Rapid scaling
5. Predefined runtimes
provectus.com
General Architecture
provectus.com
Players in the game today(much more not shown here)
provectus.com
Similarities and differences
Similarities:
• Provide Function-as-a-service
• Rely on Kubernetes for infrastructure, scaling and configuration
• Use containers for runtimes
Differences:
• methods of handling events, event types, external integrations
• Exact implementation
• ability to group functions into Applications
provectus.com
Funktion
Make no mistake, This is RedHat!
• Part of Fabric8 platform
• Which is an upstream from Openshift by RedHat
• Uses Apache Camel for event sourcing(over 200 connectors)
• Supports Flows as a way to combine multiple functions into complex applications
• Out of the box runtimes: NodeJS, anything on JVM
provectus.com
Funktion and Kubernetes
• Stores everything in ConfigMap: Functions(code and settings), Flows, Connectors
• Uses Kubernetes abstractions: Deployments for Runtimes, Services as Router
• Mounts ConfigMap with code directly into Containers
• Constantly running Pod with Operator that orchestrates everything
• Relies on metadata in services, deployments
provectus.com
Funktion: Hello World
$kubectl create namespace funky
$kubectl config set-context `kubectl config current-context` --namespace=funky
$funktion install platform
$funktion install connector http4 timer
$funktion create fn -n hello -s 'module.exports = function(context, callback) { callback(200,
"Hello, world!n"); }'
$funktion get fn
NAME PODS URL
hello 0/1 http://192.168.99.100:32440
$curl http://192.168.99.100:32440
$ kubectl describe configmap hello
provectus.com
Kubeless
• Made by bitnami
• Uses Kafka(comes out of the box) for event sourcing
• Comes with Prometheus
• Out of the box runtimes: NodeJS, Python
• CLI compliant with AWS Lambda CLI
• 2 types of triggers: http and pubSub
provectus.com
Kubeless and Kubernetes
• Creates new object Kind “Function”
• Uses ConfigMaps for storing settings/code
• Uses Services as Router for Http trigger
• Constantly running pod Kubeless Controller watches for functions create/update
provectus.com
Kubeless: Hello world
$kubectl create ns kubeless
$kubectl -n kubeless create -f “kubeless-0.0.18.yaml"
$#wait for kafka to start
$kubectl get pods -n kubeless
$kubeless function deploy get-python --runtime python27 --handler test.foobar 
$ --from-file test.py --trigger-http
$curl --data '{"Another": "Echo"}' $(minikube service get-python --url) 
--header "Content-Type:application/json"
{"Another": "Echo"}
provectus.com
Fission
• early stage(Alpha)
• Subscribes to Kubernetes watches for events in cluster
• Out of the box runtimes: Python, NodeJS, Go, C#, PHP
• Pre-warms Function containers(keeps a running pool of containers for each runtime)
• Can use NATS for queues
provectus.com
Fission Architecture
provectus.com
Fission: Hello world
$#install fission
$kubectl create -f fission-rbac.yaml
$kubectl create -f fission-nodeport.yaml
$#create function and endpoint
$fission function create --name hello --env nodejs --code hello.js
$fission route create --method GET --url /hello --function hello
$curl http://$node_ip/hello
Hello, world!
provectus.com
Skype:
Email:
Tel.:
provectus.com
ivaschenko.stas
sivaschenko@provectus.com
+380 679459912
Stanislav
Ivashchenko
provectus.com
Thanks!
Questions?

Serverless technologies with Kubernetes