Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Platforms Demystified: Cloud Foundry, Kubernete...
Search
Matthias Haeussler
October 10, 2019
Technology
0
36
Platforms Demystified: Cloud Foundry, Kubernetes, Eirini, and Knative
2019 - Spring One Platform, Austin, USA
Matthias Haeussler
October 10, 2019
Tweet
Share
More Decks by Matthias Haeussler
See All by Matthias Haeussler
Cloud Technologies & Services - Past, Present & Future
maeddes
0
38
Cloud and Container-based Integrated Development Environments
maeddes
0
220
Distributed Systems patterns - Spring Cloud, Service Mesh & eBPF
maeddes
2
1.1k
A guide to observability for Java apps in Kubernetes
maeddes
7
1.4k
Options Galore: From Source Code to Container Image
maeddes
1
490
Seacon 2020 - Cloud Plattformen entmystifiziert
maeddes
0
35
Cloud-Plattformen entmystifiziert: Was können Docker, Kubernetes, Cloud Foundry & Knative?
maeddes
2
160
Kubernetes and/or Cloud Foundry - How to run your Spring Boot Microservi
maeddes
0
70
Cloud Foundry Application Runtime and Kubernetes
maeddes
0
72
Other Decks in Technology
See All in Technology
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
分布で見る効果検証入門 / ai-distributional-effect
cyberagentdevelopers
PRO
4
700
Fargateを使った研修の話
takesection
0
120
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
170
omakaseしないための.rubocop.yml のつくりかた / How to Build Your .rubocop.yml to Avoid Omakase #kaigionrails
linkers_tech
3
740
新R25、乃木坂46 Mobileなどのファンビジネスを支えるマルチテナンシーなプラットフォームの全体像 / cam-multi-cloud
cyberagentdevelopers
PRO
1
130
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
740
プロダクト成長に対応するプラットフォーム戦略:Authleteによる共通認証基盤の移行事例 / Building an authentication platform using Authlete and AWS
kakehashi
1
150
君は隠しイベントを見つけれるか?
mujyun
0
290
来年もre:Invent2024 に行きたいあなたへ - “集中”と“つながり”で楽しむ -
ny7760
0
470
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
APIテスト自動化の勘所
yokawasa
7
4.2k
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Rails Girls Zürich Keynote
gr2m
93
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
107
49k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Unsuck your backbone
ammeep
668
57k
Designing for humans not robots
tammielis
249
25k
Building Your Own Lightsaber
phodgson
102
6k
Music & Morning Musume
bryan
46
6.1k
Designing the Hi-DPI Web
ddemaree
280
34k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Transcript
Platforms Demystified: Cloud Foundry, Kubernetes, Eirini, and Knative October 7–10,
2019 Austin Convention Center Matthias Haeussler, Novatec Consulting GmbH & Dr. Nic Williams, Stark & Wayne LLC
Hype & Reality
Hype & Reality
Apps Services Push Start/ Stop Scale Delete Routes Create/Delete Map/Unmap
Create/Delete Bind/Unbind Minimal Concepts
Deployment s Services NetworkPolici es LoadBalancer NodePort ReplicaSet StatefulSet Bind/Unbind
Ingress Pods Container IngressControllers HPA ConfigMaps Secrets apply YAML YAML YAML Minimal Concepts Docker Image
None
Speakers Dr. Nic Williams, CEO, Stark & Wayne @drnic Matthias
Haeussler, Principal Advocate, Novatec @maeddes
LXC Container/Platform history 2018 2017 2014 2013 2011 2008 1979
…. … … 2012 chroot Virtualization and isolation in subsystems. Examples: FreeBSD Jails, Linux VServer cgroups (2007) namespaces (2002) garden eirini warden diego istio knative kubernetes cf push
App Dev DB Systems Admin PivNet Platform Admin Secrets/Config Source
Code Build Artifact Buildpacks / Images Containers Git CI/CD
None
Agenda Extending with Databases Deploy Building from Source Running a
Platform How to choose? ?
Agenda Extending with Databases Deploy Building from Source Running a
Platform How to choose? ?
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
$ cf scale sample-app-java -i 10 cf scale eirini
$ cf scale sample-app-java -i 10 cf scale 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
kn service create $ kn service create \ sample-app-nodejs -n
test-app \ --image starkandwayne/sample-app-nodejs $ bootstrap-system-knative kwt test-app $ curl http://sample-app-nodejs.test-app.example.com Hello World! $ kubectl get pods -n test-app NAME READY STATUS kwt-net 1/1 Running sample-app-nodejs-1-deployment-nbg2j 2/2 Running … wait… $ kubectl get pods -n test-app NAME READY STATUS kwt-net 1/1 Running sample-app-nodejs-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
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 !!!!!!!%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Agenda Extending with Databases Deploy Building from Source Running a
Platform How to choose? ?
pack build $ pack build starkandwayne/sample-app-java ===> DETECTING [detector] skip:
[email protected]
[detector] pass:
[email protected]
[detector] pass:
[email protected]
[detector] pass:
[email protected]
[detector] pass:
[email protected]
[detector] pass:
[email protected]
[detector] skip:
[email protected]
[detector] skip:
[email protected]
[detector] Resolving plan... (try #1) [detector] Success! (7) … [builder] Cloud Foundry OpenJDK Buildpack 1.0.0-RC02 [builder] OpenJDK JDK 11.0.4: Contributing to layer $ docker run -ti -p 8080:8080 \ starkandwayne/sample-app-java
@d kpack image kP pack build starkandwayne/sample-app-nodejs --builder cloudfoundry/cnb:cflinufs3 \
--path sample-app-nodejs/ \ --publish Similar to:
Agenda Extending with Databases Deploy Building from Source Running a
Platform How to choose? ?
@d cf bind-service $ cf create-service smtp shared outbound-email $
cf bind-service my-node-app outbound-email $ cf env my-node-app "VCAP_SERVICES": { "smtp": [ { "binding_name": null, "credentials": { "host": "mail.authsmtp.com", "password": "special-secret", "port": 2525, "username": "ac123456" }, "instance_name": "outbound-email", "label": "smtp", "name": "outbound-email", "plan": "shared",
$ kn service update \ sample-app-nodejs -n test-app \ --image
starkandwayne/sample-app-nodejs:latest $ curl http://sample-app-nodejs.test-app.example.com Hello S1P! $ kn service list -n test-app NAME GENERATION CONDITIONS READY sample-app-nodejs 2 3 OK / 3 True $ kubectl get pods -n test-app NAME READY STATUS kwt-net 1/1 Running sample-app-nodejs-1-deployment-nbg2j 2/2 Terminating sample-app-nodejs-2-deployment-c6mrm 2/2 Running kn service update
knative secrets kubectl create secret generic smtp -n test-app \
--from-literal=SMTP_USER=devuser \ --from-literal=SMTP_PASSWORD='S!B\*d$zDsb' \ --from-literal=SMTP_HOST=10.11.12.14 kn service update show-env \ --image lhitchon/show-env:latest \ --namespace test-app \ --env-from secret:smtp
Agenda Extending with Databases Deploy Building from Source Running a
Platform How to choose? ?
Not Invented Here Platform Just because you didn't buy it
doesn't mean its not a Platform If you start with Kubernetes you will build a bespoke Platform No one else will know how your K8s environment should work Enjoy someone else's standardised Platform
Try at home up --google --cf github.com/starkandwayne/ bootstrap-kubernetes-demos up --google
up --google --knative up --google --kpack
Buy for work $ Pivotal Function Service Pivotal Container Service
Pivotal Application Service for Kubernetes Pivotal Build Service
We help build and run your platforms We help build
and run your applications How to choose?