Slide 1

Slide 1 text

Cloud Platforms “demystified” Docker, Kubernetes, Knative & Cloud Foundry Matthias Haeussler,
 Novatec Consulting GmbH 1

Slide 2

Slide 2 text

Agenda 2 • Who am I? • Why this talk? • Historical Timeline • What is a platform? • Technologies • Kubernetes • Cloud Foundry • Knative • Demo • Final comparison

Slide 3

Slide 3 text

Novatec Cloud Consultant Stuttgart Cloud Foundry Meetup Organizer @maeddes

Slide 4

Slide 4 text

@novatecgmbh #whoarewe - Novatec

Slide 5

Slide 5 text

Hype & Reality

Slide 6

Slide 6 text

Hype & Reality

Slide 7

Slide 7 text

LXC Container/Platform history 2018 2017 2014 2013 2011 2008 1979 …. … … . chroot Cloud Foundry Virtualization and isolation in subsystems. Examples: FreeBSD Jails, Linux VServer cgroups (2007) namespaces (2002) istio knative kubernetes eirini

Slide 8

Slide 8 text

Apps Services Push Start/ Stop Scale Delete Routes Create/Delete Map/Unmap Create/Delete Bind/Unbind Minimal Concepts

Slide 9

Slide 9 text

Deployments Services NetworkPolicies LoadBalancer NodePort ReplicaSet StatefulSet ClusterIP Ingress Pods Container IngressControllers HPA ConfigMaps Secrets apply YAML YAML YAML Minimal Concepts Docker Image

Slide 10

Slide 10 text

Hype & Reality

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

What is a platform? (also known as Humans and Computers) 12

Slide 13

Slide 13 text

App Dev DB Systems Admin “Provider” Platform Admin Secrets/Config Source Code Build Artifact Buildpacks / Images Containers Git CI/CD

Slide 14

Slide 14 text

Day 0 Day 1 Day 2 Day 3 • Architecture • Design • Implementation • Code-to-Repo • Build • Package • Containerize • Deploy • Multi-Tenancy • Run • Scale • Recover • Update & Patch • Observe • Version • Delete • Clean Up • End of Life Platform coverage Developer & Operator responsibility

Slide 15

Slide 15 text

Workload Abstraction Layers Virtual Machines Container Applications Functions Platform Support? • Functions • Event-Driven • 12-factor apps • Stateful apps • more “types”?

Slide 16

Slide 16 text

Easy to do the right thing 16

Slide 17

Slide 17 text

Kubernetes Intro • Container Runtime/Platform • Founded in 2013, released in 2014 • Idea based on Google’s internal platform Borg • Not opinionated, open, extensible & configurable • Major project of the Cloud Native Computing Foundation (CNCF) landscape

Slide 18

Slide 18 text

“Image build” runtime app app runtime base container runtime app Kubernetes Basics - Container

Slide 19

Slide 19 text

runtime app runtime app kubectl create pod replica set runtime app runtime app pod v2 replica set v2 deployment service/ingress endpoint Kubernetes Basics - Orchestration

Slide 20

Slide 20 text

Day 0 Day 1 Day 2 Day 3 • Architecture • Design • Implementation • Code-to-Repo • Build • Package • Containerize • Deploy • Multi-Tenancy • Run • Scale • Recover • Update & Patch • Observe • Version • Delete • Clean Up • End of Life Build source Build container Register image Kubernetes responsibility

Slide 21

Slide 21 text

kubectl apply !!!!!!!"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # kubectl apply -f deployment.yaml !!!-!!!$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1 # apiVersion: apps/v1 2 # kind: Deployment 3 # metadata: 4 # name: sample-app-nodejs 5 # spec: 6 # selector: 7 # matchLabels: 8 # app: sample-app-nodejs 9 # replicas: 3 10 # template: 11 # metadata: 12 # labels: 13 # app: sample-app-nodejs 14 # spec: 15 # containers: 16 # - name: sample-app-nodejs 17 # image: index.docker.io/starkandwayne/sample-app-nodejs:latest 18 # --- 19 # apiVersion: v1 20 # kind: Service 21 # metadata: 22 # name: sample-app-nodejs 23 # spec: 24 # selector: 25 # app: sample-app-nodejs 26 # type: LoadBalancer 27 # ports: 28 # - protocol: TCP 29 # port: 80 30 # targetPort: 8080 !!!!!!!%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Slide 22

Slide 22 text

Cloud Foundry Intro • Platform as a Service (PaaS) • Founded in 2008, released in 2011 • Fast and easy to build, test, deploy & scale apps • Opinionated, focus on simplicity for dev “Here is my source code, run it on the cloud for me - I do not care how” (Onsi Fakhouri, Pivotal)

Slide 23

Slide 23 text

app buildpack cf push app Applications Services container route cf bind-service Basics

Slide 24

Slide 24 text

Day 0 Day 1 Day 2 Day 3 • Architecture • Design • Implementation • Code-to-Repo • Build • Package • Containerize • Deploy • Multi-Tenancy • Run • Scale • Recover • Update & Patch • Observe • Version • Delete • Clean Up • End of Life Provide source or binary Cloud Foundry responsibility

Slide 25

Slide 25 text

What’s new “run CF workloads/apps on K8s”

Slide 26

Slide 26 text

Traditional

Slide 27

Slide 27 text

New

Slide 28

Slide 28 text

cf push kubectl create

Slide 29

Slide 29 text

What’s new “run CF on K8s”

Slide 30

Slide 30 text

Traditional

Slide 31

Slide 31 text

New

Slide 32

Slide 32 text

What’s new

Slide 33

Slide 33 text

cf push $ cf push sample-app $ cf scale sample-app-java -i 4 $ cf ssh sample-app-java

Slide 34

Slide 34 text

$ cf push sample-app $ kubectl get pods -n scf-eirini NAME READY STATUS sample-app-dev-bb89da1431-0 1/1 Running $ cf scale sample-app-java -i 4 $ kubectl get pods -n scf-eirini NAME READY STATUS sample-app-dev-bb89da1431-0 1/1 Running sample-app-dev-bb89da1431-1 0/1 ContainerCreating sample-app-dev-bb89da1431-2 0/1 ContainerCreating sample-app-dev-bb89da1431-3 1/1 Running $ kubectl exec -ti -n scf-eirini \ sample-app-dev-bb89da1431-0 bash cf push eirini

Slide 35

Slide 35 text

$ kubectl get pods -n scf NAME READY STATUS cf-operator-894886ff9-5s4zx 1/1 Running scf-adapter-v1-0 5/5 Running scf-api-v1-0 17/17 Running scf-bits-v1-0 7/7 Running scf-cc-worker-v1-0 5/5 Running scf-database-v1-0 5/5 Running scf-diego-api-v1-0 6/6 Running scf-doppler-v1-0 11/11 Running scf-eirini-v1-0 6/6 Running scf-log-api-v1-0 8/8 Running scf-nats-v1-0 5/5 Running scf-router-v1-0 6/6 Running scf-scheduler-v1-0 10/10 Running scf-singleton-blobstore-v1-0 7/7 Running scf-uaa-v1-0 7/7 Running update-all-cf-buildpacks-8d9lb 0/1 Completed cf push quarks

Slide 36

Slide 36 text

Knative • Open Sourced and initiated by Google • Support by Red Hat, Pivotal, IBM … • Runs on top of Kubernetes and Istio • Focus on symplifying K8s experience and provide serverless capabilities • Auto-scale on request load (down to 0)

Slide 37

Slide 37 text

VM Kubernetes Istio Serving Eventing Build

Slide 38

Slide 38 text

VM Kubernetes Istio Serving Eventing

Slide 39

Slide 39 text

VM Kubernetes Istio Serving Eventing Tekton

Slide 40

Slide 40 text

“Image build” runtime app app runtime base container runtime app

Slide 41

Slide 41 text

kn service create —image=maeddes/test service route configuration revision revision revision

Slide 42

Slide 42 text

Route Revision Service Minimal Concepts Image

Slide 43

Slide 43 text

Day 0 Day 1 Day 2 Day 3 • Architecture • Design • Implementation • Code-to-Repo • Build • Package • Containerize • Deploy • Multi-Tenancy • Run • Scale • Recover • Update & Patch • Observe • Version • Delete • Clean Up • End of Life Build source Build container Register image Knative Serving

Slide 44

Slide 44 text

Day 0 Day 1 Day 2 Day 3 • Architecture • Design • Implementation • Code-to-Repo • Build • Package • Containerize • Deploy • Multi-Tenancy • Run • Scale • Recover • Update & Patch • Observe • Version • Delete • Clean Up • End of Life Knative Serving (Knative) Tekton

Slide 45

Slide 45 text

kn service create $ kn service create \ springonedemo -n test-app \ --image drnic/springonedemo $ bootstrap-system-knative kwt test-app $ curl http://springonedemo.test-app.example.com Hello World! $ kubectl get pods -n test-app NAME READY STATUS kwt-net 1/1 Running springonedemo-1-deployment-nbg2j 2/2 Running … wait… $ kubectl get pods -n test-app NAME READY STATUS kwt-net 1/1 Running springonedemo-1-deployment-nbg2j 2/2 Terminating

Slide 46

Slide 46 text

istio knative $ kubectl get pods -n istio-system NAME READY STATUS cluster-local-gateway-5c566fd544-86wfw 1/1 Running cluster-local-gateway-5c566fd544-tx2p7 1/1 Running istio-ingressgateway-6c6cbf558b-kh6l8 2/2 Running istio-ingressgateway-6c6cbf558b-r6vpb 2/2 Running istio-pilot-7b6d979db8-vtmj9 1/1 Running $ kubectl get pods -n knative-serving NAME READY STATUS activator-68d9f95cd-9z4nz 1/1 Running autoscaler-5655c9fcfd-6x4jp 1/1 Running autoscaler-hpa-8668fc6f68-9vsfr 1/1 Running controller-5b77c5596c-qckcm 1/1 Running networking-istio-6d7d44d879-gz6j6 1/1 Running webhook-75b4fc9999-gwrp9 1/1 Running

Slide 47

Slide 47 text

provides most container platform technical capabilities + easy devX + “containerless” + scale to zero + revisions + percentage routing

Slide 48

Slide 48 text

Day 0 Day 1 Day 2 Day 3 • Architecture • Design • Implementation • Code-to-Repo • Build • Package • Containerize • Deploy • Multi-Tenancy • Run • Scale • Recover • Update & Patch • Observe • Version • Delete • Clean Up • End of Life Knative Serving Build source Build container Register image Knative Serving (Knative) Tekton Knative Serving Provide source or binary Platform coverage Human responsibility Build source Build container Register image Kubernetes responsibility Cloud Foundry responsibility

Slide 49

Slide 49 text

Try at home up --gke/az --cf github.com/starkandwayne/ bootstrap-kubernetes-demos up --gke/az up --gke/az --knative up --gke/az --kpack

Slide 50

Slide 50 text

Come to our booth! (under the balloon :))

Slide 51

Slide 51 text

Novatec Consulting GmbH Dieselstraße 18/1 D-70771 Leinfelden-Echterdingen T. +49 711 22040-700 [email protected] www.novatec-gmbh.de 51