7. 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
8. 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
9. 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
10. provectus.com
Kubeless: Hello world
$kubectl create ns kubeless
$kubectl -n kubeless create -f “kubeless-v0.1.0.yaml"
$#wait for kafka to start
$kubectl get pods -n kubeless
#Download kubeless binary for your platform
$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"}
11. provectus.com
What’s inside
$ kubectl -n kubeless get po
NAME READY STATUS RESTARTS AGE
kafka-0 1/1 Running 0 10m
kubeless-controller-1732516646-j2krw 1/1 Running 0 10m
zoo-0 1/1 Running 0 10m
$ kubectl get po
NAME READY STATUS RESTARTS AGE
get-python-3134662221-8xk54 1/1 Running 0 7m
$ kubectl get svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
get-python 10.0.0.189 <none> 8080/TCP 1m