going serverless with kubeless in google container engine (gke)

34
Going Serverless with Kubeless In Google Container Engine

Upload: bitnami

Post on 21-Jan-2018

295 views

Category:

Technology


4 download

TRANSCRIPT

Going Serverless with KubelessIn Google Container Engine

Host

Mavian RuizPartner Marketing Manager,

Bitnami

Speaker

Sebastien GoasguenSr. Director of Cloud Technologies, Bitnami

Agenda• Who is Bitnami?

• What is Kubernetes?

• Benefits of Kubernetes and Google Container Engine

• What is Serverless?

• Introduction to Kubeless

• Bitnami Demo: How to go serverless in Google Container Engine with

Kubeless

• Live Q&A: Live Q&A with Sebastien– Ask your questions via the

WebEx chat window & We’ll get to them at the end. ☺

Who is Bitnami?

150+ Apps Server-side,

Mainly Open Source,

Commercial Titles

Growing

1MM+New

Deployments

Each Month

42+Categories For

Dev, Ops &

Business Users

Loved by

Devs,

Trusted by

Ops

• Ready-to-Run – Fully-configured and ready to

run

• Up to date – Latest versions of apps are always

available

• Integrated – Target platform readied; including

monitoring

• Tuned – Consistently configured for best

performance

• Trusted – Optimized for security and performance

e.g Google Cloud Launcher

About Bitnami Containers

25 Turnkey

Application &

Infrastructure

Containers 7Development

Containers

Loved by

Devs,

Trusted by

Ops

Containers are the new application

packaging format.

Bitnami containers give you the latest

stable versions of your application stacks,

focus on coding rather than updating

dependencies or outdated libraries.

And just like Bitnami cloud and VM images,

Bitnami containers are secure, optimized,

consistent, and kept up-to-date.

Example: Joomla container released in ~4

hours1

2

3

Joomla 3.7.4 released 20 hours ago

Published in Bitnami Docker repo 4 hours later

Published in Official Django repo 15 hours later

Strength in Packaging

Local

Installers

Virtual

Machines

Cloud Container

s

Functions/

Serverles

s

evolution

What is Kubernetes?

Kubernetes is an open-source

system for automating

deployment, scaling, and

management of containerized

applications.

More about Kubernetes...

• Open-source, based on 15 years of

container expertise at Google.

• Rich core API for all key primitives

• Cluster Federation, RBAC, Quotas,

Network policies, etc.

• Fastest growing project on GitHub

Inspired by Borg

Confidential

A new ecosystem: CNCFCloud-Native technology ecosystem

Project

s:

Companies:

Architecture

How to get your Hands on k8s ?

• minikubeminikube start

• kubeadmkubeadm init

kubadm join

• GKEgcloud container clusters create foobar

Benefits of Using Kubernetes on GKEIf you do not want to manage your Kubernetes

cluster, GKE will.• Don’t have to worry about K8s

master going down

• Don’t have to learn etcd

• Don’t have to worry about container

networking

• Don’t have to worry about upgrading

your Kubernetes master upon new

K8s releases

• One-command to autoscale your

GCE instances

• Has built in authentication and

authorization.

• Built in support for Google Cloud

Monitoring via Heapster

• Built in support for logging cluster

via Google Cloud Logging

Setting up Kubernetes in GKE in 5 steps

Enable Google Container Engine API

Activate Google Cloud Shell (or not … )

Create GKE Cluster

Set defaults for gcloud command-line tool

Run a container image!

* For detailed guide: https://cloud.google.com/container-engine/docs/quickstart

1

2

3

4

5

kube is the perfect platform to build

systems on. All the core primitives are

available and the system is extendable

made up quoteBy Sebastien Goasguen

https://github.com/kubeless/kubeless

Kubernetes Native Serverless

Solution

Via Twitter from Serverless Austin...

Knitting services together through

functions

Or Gluing legos ...

Lambda Examples:

https://aws.amazon.com/lambda/

FaaS / Serverless

Somewhere in the PaaS spectrum. “ServiceFull”

• Not pushing code ala git push

• Not running fully baked containers

• Transparent infrastructure, scaling and networking

• Fine grained cost management

• source to prod

“Reduce MTTP : Mean Time To Production or MTTD

…”

Solutions

Kubeless: Kubernetes-Native Serverless

ComputingKubeless Features

• Kubernetes-native serverless

implementation

• Python and Node.js support

• HTTP and Even triggers out of the box

• Prometheus integration

• Serverless framework plugin

• Open Source and non-affiliated

• https://github.com/kubeless/kubeles

s

Deploy a Function

$ kubeless function deploy tweet \

--trigger-http \

--runtime python27 \

--handler send-tweet.tweet \

--from-file send-tweet.py \

--dependencies requirements.txt

The Magic Beneath

• Third Party Resource extension (move to Custom

Resource Definition under way)

• A controller written in Golang

• Functions are injected into Pod

• Functions stored in ConfigMaps

• Scaling via Deployment

• Routing via Ingress rules (coming up)

• A CLI that talks to the k8s API server

Serverless Framework

● Leading Serverless tool/framework

● Kubeless plugin as first class provided

$ serverless create --template kubeless-nodejs --path webinar

Serverless: Generating boilerplate...

Serverless: Generating boilerplate in

"/Users/sebgoa/Desktop/foobar/webinar/webinar"

_______ __

| _ .-----.----.--.--.-----.----| .-----.-----.-----.

| |___| -__| _| | | -__| _| | -__|__ --|__ --|

|____ |_____|__| \___/|_____|__| |__|_____|_____|_____|

| | | The Serverless Application Framework

| | serverless.com, v1.17.0

-------'

Serverless: Successfully generated boilerplate for template: "kubeless-nodejs"

serverless plugin

DEMO: Kubeless

Roadmap

• Event triggers for Node.js

• Ingress support via CLI

• Additional runtimes (e.g Java, Golang)

• Build pipeline for improved dependency handling

• Support for different types of event systems (e.g nats.io)

• Scheduled function (via k8s cron jobs)

• VScode plugin

• Improved UI

• Additional metadata handling in serverless plugin

• Support for packaging function (e.g .zip files)

• Functions repository (https://github.com/kubeless/functions)

Get Started on Kubernetes with

Bitnami 1

2

3

4

5

6

7

Sebastien’s contact info: [email protected] or @sebgoa on

Twitter How-to Setup K8s on GKE: cloud.google.com/container-

engine/docs/quickstart

Get Kubeless: github.com/kubeless/kubeless

Bitnami documentation on Kubernetes:

docs.bitnami.com/kubernetes

Other Bitnami Kubernetes projects: bitnami.com/kubernetes

Bitnami documentation for Containers: docs.bitnami.com/containers

Bitnami-base Containers: www.bitnami.com/containers8

Recording of webinar to come!

Confidential

Get Started on Kubernetes with Bitnami 1

2

3

4

5

6

7

Sebastien’s contact info: [email protected] or @sebgoa on

Twitter How-to Setup K8s on GKE: cloud.google.com/container-

engine/docs/quickstart

Get Kubeless: github.com/kubeless/kubeless

Bitnami documentation on Kubernetes:

docs.bitnami.com/kubernetes

Other Bitnami Kubernetes projects: bitnami.com/kubernetes

Bitnami documentation for Containers:

docs.bitnami.com/containers

Bitnami-base Containers: www.bitnami.com/containers

8 On-demand recording: http://bitn.am/2u5bOnA

Live Q&A with

Sebastien