SlideShare a Scribd company logo
1 of 34
Download to read offline
K8S IS NOT FOR APP DEVELOPERS
What offers Knative and Crossplane to devs?
WHO AM I?
JOSEF FUCHSHUBER
• PRINCIPAL SOFTWARE ARCHITECT @ QAWARE
• DESIGNS AND BUILDS CLOUD
ARCHITECTURES FOR OUR CUSTOMERS
• LOVES CONTINUOUS DELIVERY AND ALL THE
RELATED TOOLS
„The first k8s years were under the slogan:
Deliver a production ready cloud native platform.
And not: Developer Happiness first.
-My opinion
How do you pronounce
kubectl ?
kube cuddle ?
kube control ?
kube see tea el ?
… ?
EXAMPLE: KUBERNETES HAS BECOME BIG AND COMPLEX
Source: https://kccna18.sched.com/event/GrRI/deploying-rock-solid-applications-with-kubernetes-jelmer-snoeck-manifold
„BUT I JUST WANTED TO DEPLOY AN APP!“
Source: https://giphy.com/gifs/cbc-comedy-what-3o7btPCcdNniyf0ArS
DEVELOPER HAPPINESS @ AIRBNB
Melanie Cebula: "The configuration and the tools are complex ... But what I want to stress is that these are all
solvable problems.“
1. Reduce kubernetes boilerplate
2. Standardize on environments and namespaces
3. Everything about a service should be in one place in git
4. Make best practices the default by generating configuration
5. Create a wrapper for kubectl commands
6. Automate common k8s workflows
7. CI/CD should run the same commands that engineers run locally, in a container
8. Validate configuration as part of CI/CD
9. Code and configuration should be deployed with the same process
10. Use custom resources and custom controllers to integrate with your infrastructure
Source: https://kccna18.sched.com/event/GsxY/keynote-developing-kubernetes-services-at-airbnb-scale-melanie-cebula-software-engineer-airbnb
CUSTOM RESOURCE DEFINITIONS (CRD) + CONTROLLER
• CRD is a powerful feature that allows K8s operators to add their own objects to the
Kubernetes cluster.
• These objects can be used like all native Kubernetes objects via the K8s API.
• Custom controllers are based on the operator pattern and are responsible for the
lifecycle handling of CRDs.
CROSSPLANE IS STILL VERY YOUNG
• Crossplane is a new Open Source project and is only at the beginning
• Dec 2018: Version 0.1
• Apr 2019: Version 0.2
• Behind Crossplane is the company Upbound, which has already made Rook to a
successful CNCF project.
• Crossplane describes itself as Multicloud Control Plane for Cloud Native Workload.
MULTICLOUD CONTROL PLANE
• Crossplane offers an abstraction for Kubernetes workload and the infrastructure components required for it.
• Crossplane is an open control plane: It uses managed services that your cloud provider offers (databases,
storage, message queues, …) and uses independent infrastructure.
• Currently, the major cloud providers Google, Amazon and Microsoft are supported.
Source: https://crossplane.io/docs/v0.2/
DEFINITION OF AN INFRASTRUCTURE DEPENDENCIES FOR OUR WORKLOAD
CROSSPLANE WORKLOAD DEFINITION
MORE INFOS ABOUT CROSSPLANE
• KubeConNA 2018: Clusters as Cattle - Wrangling Clusters Not Just Nodes - Illya Chekrygin,
Upbound
• Crossplane Blog: Crossplane composes fully-managed services in Kubernetes to deploy GitLab into
multiple clouds
KNATIVE IS ALSO STILL A YOUNG PROJECT - BUT ALREADY WELL SPREAD
• Published in June 2018 by Google, latest version is 0.6.1
• The main contributors are Google, Pivotal, IBM (Red Hat) & SAP
• Cloud providers will base some of their serverless offerings on Knative:
• „Red Hat plans to combine Knative with its OpenShift commercial Kubernetes
distribution“
• „Pivotal is rolling Knative into its Pivotal Function Service“
• „Google Cloud Run, a fully managed serverless execution environment.“
THE NATIVE AUDIENCE
Source: https://github.com/knative/docs/tree/master/docs
KNATIVE IS MADE UP OF THREE COMPONENTS
• Build - Source-to-container build orchestration
• Eventing - Management and delivery of events
• Google PubSub
• AWS SQS
• GitHub event types
• Kafka
• CronJob
• …
• Serving - Request-driven compute that can scale to zero
KNATIVE EVENTING DEMO
• Google Cloud Run - fully managed
• Google Pub/Sub
• „Hello World“ Go Service
Source: https://medium.com/knative/announcing-knative-v0-5-release-cfe646ca8e30
Knative Eventing Object Model
KNATIVE SERVING OBJECT MODEL
Source: https://github.com/knative/serving/blob/master/docs/spec/overview.md
KNATIVE: AUTOSCALE HELLO WORLD
KNATIVE SERVING DEMO
• Google GKE Cluster with Cloud Run
• knctl as kubectl Wrapper
• „Hello World“ Go Service
• Service endpoint returns „hello world“
string. Answer is configurable with env-
variable.
• Latency and cpu usage is „configurable“
as URL argument
• Demo parts:
• Scale from/to zero
• Canary deployments
• Autoscaling
DEMO #1 (1/2): SCALE FROM ZERO
$ knctl pod list -s knative-helloworld -n helloworld
Pods for service 'knative-helloworld'
Revision Name Phase Restarts Age
0 pods
Succeeded
$ knctl service list -n helloworld
Services in namespace 'helloworld'
Name Domain Annotations Conditions Age
knative-helloworld knative-helloworld.helloworld.example.com - 3 OK / 3 1d
DEMO #1 (2/2): SCALE FROM ZERO AND BACK
$ curl -H "Host: knative-helloworld.helloworld.example.com" http://35.234.97.39
Hello world!
Slept for 300.32 milliseconds.
$ knctl pod list -s knative-helloworld -n helloworld
Pods for service 'knative-helloworld'
Revision Name Phase Restarts Age
knative-helloworld-vltgs knative-helloworld-vltgs-deployment-777c96bcd-zxvkk Running 0 1m
1 pods
Succeeded
DEMO #2: ROUTING AND CANARY DEPLOYMENTS (1/6)
$ knctl route list -n helloworld
Routes in namespace 'helloworld'
Name Domain Traffic Annotations Conditions Age
knative-helloworld knative-helloworld.helloworld.example.com 100% -> knative-helloworld - 3 OK / 3 1d
1 routes
Succeeded
List all routes
DEMO #2: ROUTING AND CANARY DEPLOYMENTS (2/6)
$ knctl deploy -n helloworld -s knative-helloworld --image gcr.io/engineering-cloud/knative-helloworld --env
TARGET=blue --managed-route=false
Name knative-helloworld
Waiting for new revision (after revision 'knative-helloworld-vltgs') to be created...
Tagging new revision 'knative-helloworld-jggrj' as 'latest'
Tagging older revision 'knative-helloworld-vltgs' as 'previous'
Annotating new revision 'knative-helloworld-jggrj'
Waiting for new revision 'knative-helloworld-jggrj' to be ready for up to 5m0s (logs below)...
Revision 'knative-helloworld-jggrj' became ready
Continuing to watch logs for 5s before exiting
knative-helloworld-jggrj > knative-helloworld-jggrj-deployment-7d99dcb5-jt7z6 | 2019/06/11 22:30:07 Hello world
sample started.
knative-helloworld-jggrj > knative-helloworld-jggrj-deployment-66b84ddd6-w6zk5 | 2019/06/11 22:30:08 Hello world
sample started.
Succeeded
Deploy "blue" revision with unmanaged routes
DEMO #2: ROUTING AND CANARY DEPLOYMENTS (3/6)
$ knctl rollout -n helloworld --route knative-helloworld -p knative-helloworld:latest=100%
Succeeded
$ knctl route list -n helloworld
Routes in namespace 'helloworld'
Name Domain Traffic Annotations Conditions Age
knative-helloworld knative-helloworld.helloworld.example.com 100% -> knative-helloworld-jggrj - 3 OK / 3 1d
1 routes
Succeeded
Lock down route to current revision
DEMO #2: ROUTING AND CANARY DEPLOYMENTS (4/6)
$ knctl deploy -n helloworld -s knative-helloworld --image gcr.io/engineering-cloud/knative-helloworld --env
TARGET=green --managed-route=false
Name knative-helloworld
Waiting for new revision (after revision 'knative-helloworld-jggrj') to be created...
Tagging new revision 'knative-helloworld-zc29p' as 'latest'
Tagging older revision 'knative-helloworld-jggrj' as 'previous'
Annotating new revision 'knative-helloworld-zc29p'
Waiting for new revision 'knative-helloworld-zc29p' to be ready for up to 5m0s (logs below)...
Revision 'knative-helloworld-zc29p' became ready
Continuing to watch logs for 5s before exiting
knative-helloworld-zc29p > knative-helloworld-zc29p-deployment-fbfdcc5d5-lqv7k | 2019/06/11 22:39:32 Hello world
sample started.
knative-helloworld-zc29p > knative-helloworld-zc29p-deployment-5f44797d4d-647j5 | 2019/06/11 22:39:31 Hello world
sample started.
Succeeded
Deploy „green" revision with unmanaged routes
DEMO #2: ROUTING AND CANARY DEPLOYMENTS (5/6)
$ knctl rollout -n helloworld --route knative-helloworld -p knative-helloworld:latest=10% -p
knative-helloworld:previous=90%
Succeeded
$ knctl route list -n helloworld
Routes in namespace 'helloworld'
Name Domain Traffic Annotations Conditions Age
knative-helloworld knative-helloworld.helloworld.example.com 10% -> knative-helloworld-zc29p - 3 OK / 3 1d
90% -> knative-helloworld-jggrj
1 routes
Succeeded
Let's roll out new version to 10% of users
$ watch -n 0,5 curl -H "Host: knative-helloworld.helloworld.example.com" http://35.234.97.39
Check result
DEMO #2: ROUTING AND CANARY DEPLOYMENTS (6/6)
$ knctl rollout -n helloworld --route knative-helloworld -p knative-helloworld:latest=100%
Succeeded
$ knctl route list -n helloworld
Routes in namespace 'helloworld'
Name Domain Traffic Annotations Conditions Age
knative-helloworld knative-helloworld.helloworld.example.com 100% -> knative-helloworld-zc29p - 3 OK / 3 1d
1 routes
Succeeded
Roll out remaining traffic
$ watch -n 0,5 curl -H "Host: knative-helloworld.helloworld.example.com" http://35.234.97.39
Check result
DEMO #3: AUTOSCALE - CONCURRENT REQUESTS (1/2)
$ knctl deploy 
--namespace helloworld 
--service knative-helloworld 
--image gcr.io/engineering-cloud/knative-helloworld 
--env TARGET=RevAuto1 
--annotation autoscaling.knative.dev/class=kpa.autoscaling.knative.dev 
--annotation autoscaling.knative.dev/metric=concurrency 
--annotation autoscaling.knative.dev/target="10" 
--annotation autoscaling.knative.dev/minScale="1" 
--annotation autoscaling.knative.dev/maxScale="20"
DEMO #3: AUTOSCALE - CONCURRENCY (2/2)
hey -z 10s -c 500 -host "knative-helloworld.helloworld.example.com" "http://35.234.97.39?
sleep=300"
$ watch knctl pod list -s knative-helloworld -n helloworld
knative-helloworld-fgzcf knative-helloworld-fgzcf-deployment-6cbb48c9df-7bp9h Running 0 45s
knative-helloworld-fgzcf knative-helloworld-fgzcf-deployment-6cbb48c9df-hjcld Running 0 49s
knative-helloworld-fgzcf knative-helloworld-fgzcf-deployment-6cbb48c9df-vr7kd Running 0 45s
Autoscaler „panic mode“: Calculates a 6 second panic window and will enter panic mode if that
window reached 2x the target concurrency
Check result
hey -z 90s -c 200 -host "knative-helloworld.helloworld.example.com" "http://35.234.97.39?
sleep=500"
Autoscaler "average concurrency over a 60 second window"
DEMO #4: AUTOSCALE - CPU
$ knctl deploy 
--namespace helloworld 
--service knative-helloworld 
--image gcr.io/engineering-cloud/knative-helloworld 
--env TARGET=RevAuto2 
--annotation autoscaling.knative.dev/class=hpa.autoscaling.knative.dev 
--annotation autoscaling.knative.dev/metric=cpu 
--annotation autoscaling.knative.dev/target="60"
Thank you! Q&A and Small Talk in the Kitchen!

More Related Content

What's hot

What's hot (20)

Building kubectl plugins with Quarkus | DevNation Tech Talk
Building kubectl plugins with Quarkus | DevNation Tech TalkBuilding kubectl plugins with Quarkus | DevNation Tech Talk
Building kubectl plugins with Quarkus | DevNation Tech Talk
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
 
Lessons learned from the charts repo
Lessons learned from the charts repoLessons learned from the charts repo
Lessons learned from the charts repo
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and BeyondTectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)
 
Deep dive in container service discovery
Deep dive in container service discoveryDeep dive in container service discovery
Deep dive in container service discovery
 
Zero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google CloudZero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google Cloud
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Kubernetes & the 12 factor cloud apps
Kubernetes & the 12 factor cloud appsKubernetes & the 12 factor cloud apps
Kubernetes & the 12 factor cloud apps
 
How kubernetes works community, velocity, and contribution - osls 2017 (1)
How kubernetes works  community, velocity, and contribution - osls 2017 (1)How kubernetes works  community, velocity, and contribution - osls 2017 (1)
How kubernetes works community, velocity, and contribution - osls 2017 (1)
 
Microservices on Kubernetes - The simple way
Microservices on Kubernetes - The simple wayMicroservices on Kubernetes - The simple way
Microservices on Kubernetes - The simple way
 
Helm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesHelm - Package Manager for Kubernetes
Helm - Package Manager for Kubernetes
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetup
 
Kubernetes - A Rising Hero
Kubernetes - A Rising HeroKubernetes - A Rising Hero
Kubernetes - A Rising Hero
 
Lessons learned with kubernetes in production at PlayPass
Lessons learned with kubernetes in productionat PlayPassLessons learned with kubernetes in productionat PlayPass
Lessons learned with kubernetes in production at PlayPass
 
Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)
 
Zero downtime-java-deployments-with-docker-and-kubernetes
Zero downtime-java-deployments-with-docker-and-kubernetesZero downtime-java-deployments-with-docker-and-kubernetes
Zero downtime-java-deployments-with-docker-and-kubernetes
 

Similar to K8s is not for App Developers

Similar to K8s is not for App Developers (20)

K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basics
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Making Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with NovaMaking Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with Nova
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
From Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in SydneyFrom Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in Sydney
 
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdfDevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
 
CKA_1st.pptx
CKA_1st.pptxCKA_1st.pptx
CKA_1st.pptx
 
Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google Cloud
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
Kubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native PragueKubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native Prague
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
 
How to Train Your Docker Cloud
How to Train Your Docker CloudHow to Train Your Docker Cloud
How to Train Your Docker Cloud
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
 
Making kubernetes simple for developers
Making kubernetes simple for developersMaking kubernetes simple for developers
Making kubernetes simple for developers
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
Kubernetes Operability Tooling (LEAP 2019)
Kubernetes Operability Tooling (LEAP 2019)Kubernetes Operability Tooling (LEAP 2019)
Kubernetes Operability Tooling (LEAP 2019)
 

More from QAware GmbH

"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
QAware GmbH
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See... Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
QAware GmbH
 

More from QAware GmbH (20)

50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf
 
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
 
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN MainzFully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
 
Down the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile ArchitectureDown the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile Architecture
 
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
 
Make Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringMake Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform Engineering
 
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit PlaywrightDer Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
 
Was kommt nach den SPAs
Was kommt nach den SPAsWas kommt nach den SPAs
Was kommt nach den SPAs
 
Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See... Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
 
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
 
Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
 
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPKontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
 
Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
 
Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API Gateways
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
 

Recently uploaded

In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
gajnagarg
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
vexqp
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Bertram Ludäscher
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
nirzagarg
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
SayantanBiswas37
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
HyderabadDolls
 

Recently uploaded (20)

In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 

K8s is not for App Developers

  • 1. K8S IS NOT FOR APP DEVELOPERS What offers Knative and Crossplane to devs?
  • 2. WHO AM I? JOSEF FUCHSHUBER • PRINCIPAL SOFTWARE ARCHITECT @ QAWARE • DESIGNS AND BUILDS CLOUD ARCHITECTURES FOR OUR CUSTOMERS • LOVES CONTINUOUS DELIVERY AND ALL THE RELATED TOOLS
  • 3. „The first k8s years were under the slogan: Deliver a production ready cloud native platform. And not: Developer Happiness first. -My opinion
  • 4. How do you pronounce kubectl ? kube cuddle ? kube control ? kube see tea el ? … ?
  • 5. EXAMPLE: KUBERNETES HAS BECOME BIG AND COMPLEX Source: https://kccna18.sched.com/event/GrRI/deploying-rock-solid-applications-with-kubernetes-jelmer-snoeck-manifold
  • 6. „BUT I JUST WANTED TO DEPLOY AN APP!“ Source: https://giphy.com/gifs/cbc-comedy-what-3o7btPCcdNniyf0ArS
  • 7. DEVELOPER HAPPINESS @ AIRBNB Melanie Cebula: "The configuration and the tools are complex ... But what I want to stress is that these are all solvable problems.“ 1. Reduce kubernetes boilerplate 2. Standardize on environments and namespaces 3. Everything about a service should be in one place in git 4. Make best practices the default by generating configuration 5. Create a wrapper for kubectl commands 6. Automate common k8s workflows 7. CI/CD should run the same commands that engineers run locally, in a container 8. Validate configuration as part of CI/CD 9. Code and configuration should be deployed with the same process 10. Use custom resources and custom controllers to integrate with your infrastructure Source: https://kccna18.sched.com/event/GsxY/keynote-developing-kubernetes-services-at-airbnb-scale-melanie-cebula-software-engineer-airbnb
  • 8. CUSTOM RESOURCE DEFINITIONS (CRD) + CONTROLLER • CRD is a powerful feature that allows K8s operators to add their own objects to the Kubernetes cluster. • These objects can be used like all native Kubernetes objects via the K8s API. • Custom controllers are based on the operator pattern and are responsible for the lifecycle handling of CRDs.
  • 9.
  • 10. CROSSPLANE IS STILL VERY YOUNG • Crossplane is a new Open Source project and is only at the beginning • Dec 2018: Version 0.1 • Apr 2019: Version 0.2 • Behind Crossplane is the company Upbound, which has already made Rook to a successful CNCF project. • Crossplane describes itself as Multicloud Control Plane for Cloud Native Workload.
  • 11. MULTICLOUD CONTROL PLANE • Crossplane offers an abstraction for Kubernetes workload and the infrastructure components required for it. • Crossplane is an open control plane: It uses managed services that your cloud provider offers (databases, storage, message queues, …) and uses independent infrastructure. • Currently, the major cloud providers Google, Amazon and Microsoft are supported. Source: https://crossplane.io/docs/v0.2/
  • 12. DEFINITION OF AN INFRASTRUCTURE DEPENDENCIES FOR OUR WORKLOAD
  • 14. MORE INFOS ABOUT CROSSPLANE • KubeConNA 2018: Clusters as Cattle - Wrangling Clusters Not Just Nodes - Illya Chekrygin, Upbound • Crossplane Blog: Crossplane composes fully-managed services in Kubernetes to deploy GitLab into multiple clouds
  • 15.
  • 16. KNATIVE IS ALSO STILL A YOUNG PROJECT - BUT ALREADY WELL SPREAD • Published in June 2018 by Google, latest version is 0.6.1 • The main contributors are Google, Pivotal, IBM (Red Hat) & SAP • Cloud providers will base some of their serverless offerings on Knative: • „Red Hat plans to combine Knative with its OpenShift commercial Kubernetes distribution“ • „Pivotal is rolling Knative into its Pivotal Function Service“ • „Google Cloud Run, a fully managed serverless execution environment.“
  • 17. THE NATIVE AUDIENCE Source: https://github.com/knative/docs/tree/master/docs
  • 18. KNATIVE IS MADE UP OF THREE COMPONENTS • Build - Source-to-container build orchestration • Eventing - Management and delivery of events • Google PubSub • AWS SQS • GitHub event types • Kafka • CronJob • … • Serving - Request-driven compute that can scale to zero
  • 19. KNATIVE EVENTING DEMO • Google Cloud Run - fully managed • Google Pub/Sub • „Hello World“ Go Service Source: https://medium.com/knative/announcing-knative-v0-5-release-cfe646ca8e30 Knative Eventing Object Model
  • 20. KNATIVE SERVING OBJECT MODEL Source: https://github.com/knative/serving/blob/master/docs/spec/overview.md
  • 22. KNATIVE SERVING DEMO • Google GKE Cluster with Cloud Run • knctl as kubectl Wrapper • „Hello World“ Go Service • Service endpoint returns „hello world“ string. Answer is configurable with env- variable. • Latency and cpu usage is „configurable“ as URL argument • Demo parts: • Scale from/to zero • Canary deployments • Autoscaling
  • 23. DEMO #1 (1/2): SCALE FROM ZERO $ knctl pod list -s knative-helloworld -n helloworld Pods for service 'knative-helloworld' Revision Name Phase Restarts Age 0 pods Succeeded $ knctl service list -n helloworld Services in namespace 'helloworld' Name Domain Annotations Conditions Age knative-helloworld knative-helloworld.helloworld.example.com - 3 OK / 3 1d
  • 24. DEMO #1 (2/2): SCALE FROM ZERO AND BACK $ curl -H "Host: knative-helloworld.helloworld.example.com" http://35.234.97.39 Hello world! Slept for 300.32 milliseconds. $ knctl pod list -s knative-helloworld -n helloworld Pods for service 'knative-helloworld' Revision Name Phase Restarts Age knative-helloworld-vltgs knative-helloworld-vltgs-deployment-777c96bcd-zxvkk Running 0 1m 1 pods Succeeded
  • 25. DEMO #2: ROUTING AND CANARY DEPLOYMENTS (1/6) $ knctl route list -n helloworld Routes in namespace 'helloworld' Name Domain Traffic Annotations Conditions Age knative-helloworld knative-helloworld.helloworld.example.com 100% -> knative-helloworld - 3 OK / 3 1d 1 routes Succeeded List all routes
  • 26. DEMO #2: ROUTING AND CANARY DEPLOYMENTS (2/6) $ knctl deploy -n helloworld -s knative-helloworld --image gcr.io/engineering-cloud/knative-helloworld --env TARGET=blue --managed-route=false Name knative-helloworld Waiting for new revision (after revision 'knative-helloworld-vltgs') to be created... Tagging new revision 'knative-helloworld-jggrj' as 'latest' Tagging older revision 'knative-helloworld-vltgs' as 'previous' Annotating new revision 'knative-helloworld-jggrj' Waiting for new revision 'knative-helloworld-jggrj' to be ready for up to 5m0s (logs below)... Revision 'knative-helloworld-jggrj' became ready Continuing to watch logs for 5s before exiting knative-helloworld-jggrj > knative-helloworld-jggrj-deployment-7d99dcb5-jt7z6 | 2019/06/11 22:30:07 Hello world sample started. knative-helloworld-jggrj > knative-helloworld-jggrj-deployment-66b84ddd6-w6zk5 | 2019/06/11 22:30:08 Hello world sample started. Succeeded Deploy "blue" revision with unmanaged routes
  • 27. DEMO #2: ROUTING AND CANARY DEPLOYMENTS (3/6) $ knctl rollout -n helloworld --route knative-helloworld -p knative-helloworld:latest=100% Succeeded $ knctl route list -n helloworld Routes in namespace 'helloworld' Name Domain Traffic Annotations Conditions Age knative-helloworld knative-helloworld.helloworld.example.com 100% -> knative-helloworld-jggrj - 3 OK / 3 1d 1 routes Succeeded Lock down route to current revision
  • 28. DEMO #2: ROUTING AND CANARY DEPLOYMENTS (4/6) $ knctl deploy -n helloworld -s knative-helloworld --image gcr.io/engineering-cloud/knative-helloworld --env TARGET=green --managed-route=false Name knative-helloworld Waiting for new revision (after revision 'knative-helloworld-jggrj') to be created... Tagging new revision 'knative-helloworld-zc29p' as 'latest' Tagging older revision 'knative-helloworld-jggrj' as 'previous' Annotating new revision 'knative-helloworld-zc29p' Waiting for new revision 'knative-helloworld-zc29p' to be ready for up to 5m0s (logs below)... Revision 'knative-helloworld-zc29p' became ready Continuing to watch logs for 5s before exiting knative-helloworld-zc29p > knative-helloworld-zc29p-deployment-fbfdcc5d5-lqv7k | 2019/06/11 22:39:32 Hello world sample started. knative-helloworld-zc29p > knative-helloworld-zc29p-deployment-5f44797d4d-647j5 | 2019/06/11 22:39:31 Hello world sample started. Succeeded Deploy „green" revision with unmanaged routes
  • 29. DEMO #2: ROUTING AND CANARY DEPLOYMENTS (5/6) $ knctl rollout -n helloworld --route knative-helloworld -p knative-helloworld:latest=10% -p knative-helloworld:previous=90% Succeeded $ knctl route list -n helloworld Routes in namespace 'helloworld' Name Domain Traffic Annotations Conditions Age knative-helloworld knative-helloworld.helloworld.example.com 10% -> knative-helloworld-zc29p - 3 OK / 3 1d 90% -> knative-helloworld-jggrj 1 routes Succeeded Let's roll out new version to 10% of users $ watch -n 0,5 curl -H "Host: knative-helloworld.helloworld.example.com" http://35.234.97.39 Check result
  • 30. DEMO #2: ROUTING AND CANARY DEPLOYMENTS (6/6) $ knctl rollout -n helloworld --route knative-helloworld -p knative-helloworld:latest=100% Succeeded $ knctl route list -n helloworld Routes in namespace 'helloworld' Name Domain Traffic Annotations Conditions Age knative-helloworld knative-helloworld.helloworld.example.com 100% -> knative-helloworld-zc29p - 3 OK / 3 1d 1 routes Succeeded Roll out remaining traffic $ watch -n 0,5 curl -H "Host: knative-helloworld.helloworld.example.com" http://35.234.97.39 Check result
  • 31. DEMO #3: AUTOSCALE - CONCURRENT REQUESTS (1/2) $ knctl deploy --namespace helloworld --service knative-helloworld --image gcr.io/engineering-cloud/knative-helloworld --env TARGET=RevAuto1 --annotation autoscaling.knative.dev/class=kpa.autoscaling.knative.dev --annotation autoscaling.knative.dev/metric=concurrency --annotation autoscaling.knative.dev/target="10" --annotation autoscaling.knative.dev/minScale="1" --annotation autoscaling.knative.dev/maxScale="20"
  • 32. DEMO #3: AUTOSCALE - CONCURRENCY (2/2) hey -z 10s -c 500 -host "knative-helloworld.helloworld.example.com" "http://35.234.97.39? sleep=300" $ watch knctl pod list -s knative-helloworld -n helloworld knative-helloworld-fgzcf knative-helloworld-fgzcf-deployment-6cbb48c9df-7bp9h Running 0 45s knative-helloworld-fgzcf knative-helloworld-fgzcf-deployment-6cbb48c9df-hjcld Running 0 49s knative-helloworld-fgzcf knative-helloworld-fgzcf-deployment-6cbb48c9df-vr7kd Running 0 45s Autoscaler „panic mode“: Calculates a 6 second panic window and will enter panic mode if that window reached 2x the target concurrency Check result hey -z 90s -c 200 -host "knative-helloworld.helloworld.example.com" "http://35.234.97.39? sleep=500" Autoscaler "average concurrency over a 60 second window"
  • 33. DEMO #4: AUTOSCALE - CPU $ knctl deploy --namespace helloworld --service knative-helloworld --image gcr.io/engineering-cloud/knative-helloworld --env TARGET=RevAuto2 --annotation autoscaling.knative.dev/class=hpa.autoscaling.knative.dev --annotation autoscaling.knative.dev/metric=cpu --annotation autoscaling.knative.dev/target="60"
  • 34. Thank you! Q&A and Small Talk in the Kitchen!