Cloud Platforms “demystified”
Docker, Kubernetes, Knative &
Cloud Foundry
Matthias Haeussler,

Novatec Consulting GmbH
1
Agenda
2
• Who am I?
• Why this talk?
• Historical Timeline
• What is a platform?
• Technologies
• Kubernetes
• Cloud Foundry
• Knative
• Demo
• Final comparison
Novatec Cloud Consultant Stuttgart Cloud Foundry Meetup Organizer
@maeddes
@novatecgmbh
#whoarewe - Novatec
Hype & Reality
Hype & Reality
LXC
Container/Platform history
2018201720142013201120081979 …. … ….
chroot
Cloud
Foundry
Virtualization and
isolation in subsystems.
Examples: FreeBSD Jails,
Linux VServer
cgroups (2007)
namespaces (2002)
istio knative
kubernetes eirini
Apps
Services
Push
Start/
Stop
Scale
Delete
Routes
Create/Delete
Map/Unmap
Create/Delete
Bind/Unbind
Minimal Concepts
Deployments
Services
NetworkPolicies
LoadBalancer
NodePort
ReplicaSet
StatefulSet
ClusterIP
Ingress
Pods
Container
IngressControllers
HPA
ConfigMaps
Secrets
apply
YAML
YAML YAML
Minimal Concepts
Docker Image
Hype & Reality
What is a platform?
(also known as Humans and Computers)
12
App Dev
DB Systems Admin
“Provider”
Platform Admin
Secrets/Config
Source Code Build Artifact
Buildpacks / Images
ContainersGit CI/CD
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 coverageDeveloper & Operator responsibility
Easy to do the right thing
15
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
“Image
build”
runtime
app
app
runtime base
container
runtime
app
Kubernetes Basics - Container
runtime
app
runtime
app
kubectl create pod
replica set
runtime
app
runtime
app
pod v2
replica set v2
deploymentservice/ingress
endpoint
Kubernetes Basics - Orchestration
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
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
!!!!!!!%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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)
app
buildpack
cf push
app
Applications Services
container
route
cf bind-service
Basics
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
What’s new
“run CF
workloads/apps
on K8s”
Traditional
New
cf push kubectl create
📄📄📄
📄📄📄
What’s new
“run CF
on K8s”
Traditional
New
What’s new
cf push
$ cf push sample-app
$ cf scale sample-app-java -i 4
$ cf ssh sample-app-java
$ 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
$ 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
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)
VM
Kubernetes
Istio
Serving EventingBuild
VM
Kubernetes
Istio
Serving Eventing
VM
Kubernetes
Istio
Serving EventingTekton
“Image
build”
runtime
app
app
runtime base
container
runtime
app
kn service create —image=maeddes/test
service
route
configuration
revision
revision
revision
Route
Revision
Service
Minimal Concepts
Image
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
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
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
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
provides most container platform
technical capabilities
+ easy devX
+ “containerless”
+ scale to zero
+ revisions
+ percentage routing
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 coverageHuman responsibility
Build source Build container Register image Kubernetes responsibility
Cloud Foundry responsibility
Try at home
up --gke/az --cf
github.com/starkandwayne/
bootstrap-kubernetes-demos
up --gke/az
up --gke/az --knative
up --gke/az --kpack
Novatec Consulting GmbH
Dieselstraße 18/1
D-70771 Leinfelden-Echterdingen
T. +49 711 22040-700
info@novatec-gmbh.de
www.novatec-gmbh.de
49

Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry

  • 1.
    Cloud Platforms “demystified” Docker,Kubernetes, Knative & Cloud Foundry Matthias Haeussler,
 Novatec Consulting GmbH 1
  • 2.
    Agenda 2 • Who amI? • Why this talk? • Historical Timeline • What is a platform? • Technologies • Kubernetes • Cloud Foundry • Knative • Demo • Final comparison
  • 3.
    Novatec Cloud ConsultantStuttgart Cloud Foundry Meetup Organizer @maeddes
  • 4.
  • 5.
  • 6.
  • 7.
    LXC Container/Platform history 2018201720142013201120081979 ….… …. chroot Cloud Foundry Virtualization and isolation in subsystems. Examples: FreeBSD Jails, Linux VServer cgroups (2007) namespaces (2002) istio knative kubernetes eirini
  • 8.
  • 9.
  • 10.
  • 12.
    What is aplatform? (also known as Humans and Computers) 12
  • 13.
    App Dev DB SystemsAdmin “Provider” Platform Admin Secrets/Config Source Code Build Artifact Buildpacks / Images ContainersGit CI/CD
  • 14.
    Day 0 Day1 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 coverageDeveloper & Operator responsibility
  • 15.
    Easy to dothe right thing 15
  • 16.
    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
  • 17.
  • 18.
    runtime app runtime app kubectl create pod replicaset runtime app runtime app pod v2 replica set v2 deploymentservice/ingress endpoint Kubernetes Basics - Orchestration
  • 19.
    Day 0 Day1 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
  • 20.
    kubectl apply !!!!!!!"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # kubectlapply -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 !!!!!!!%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • 21.
    Cloud Foundry Intro • Platform asa 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)
  • 22.
  • 23.
    Day 0 Day1 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
  • 24.
  • 25.
  • 26.
  • 27.
    cf push kubectlcreate 📄📄📄 📄📄📄
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
    cf push $ cfpush sample-app $ cf scale sample-app-java -i 4 $ cf ssh sample-app-java
  • 33.
    $ cf pushsample-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
  • 34.
    $ kubectl getpods -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
  • 35.
    Knative • Open Sourcedand 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)
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
    kn service create—image=maeddes/test service route configuration revision revision revision
  • 41.
  • 42.
    Day 0 Day1 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
  • 43.
    Day 0 Day1 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
  • 44.
    kn service create $ knservice 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
  • 45.
    istio knative $ kubectl getpods -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
  • 46.
    provides most containerplatform technical capabilities + easy devX + “containerless” + scale to zero + revisions + percentage routing
  • 47.
    Day 0 Day1 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 coverageHuman responsibility Build source Build container Register image Kubernetes responsibility Cloud Foundry responsibility
  • 48.
    Try at home up--gke/az --cf github.com/starkandwayne/ bootstrap-kubernetes-demos up --gke/az up --gke/az --knative up --gke/az --kpack
  • 49.
    Novatec Consulting GmbH Dieselstraße18/1 D-70771 Leinfelden-Echterdingen T. +49 711 22040-700 info@novatec-gmbh.de www.novatec-gmbh.de 49