SlideShare ist ein Scribd-Unternehmen logo
qaware.de
Kubernetes ist so viel mehr
als ein Container
Orchestrierer
Mario-Leander Reimer
mario-leander.reimer@qaware.de
@LeanderReimer
API SPI
2
Mario-Leander Reimer
Principal Software Architect
@LeanderReimer
#cloudnativenerd #qaware
Anno 2016 ...
QAware | 3
https://speakerdeck.com/lreimer/kubernetes-101-and-fun https://github.com/qaware/kubepad
Das Kubernetes ABC ist mittlerweile Commodity.
QAware | 4
10:04 PM - 27. November 2017
5:38 PM - 24. Februar 2019
Kubernetes ist eine flexibel erweiterbare
Plattform mit zahlreichen APIs und SPIs die
deklarativ aber vor allem programmatisch
genutzt werden können um neue Abstraktionen
und eigene Erweiterungen zu realisieren.
Too much cognitive load will become
a bottleneck for fast flow and high productivity.
QAware | 7
■ Intrinsic Cognitive Load
Relates to fundamental aspects and knowledge in the
problem space (e.g. used languages, APIs, frameworks)
■ Extraneous Cognitive Load
Relates to the environment
(e.g. deployment, configuration, console commands)
■ Germane Cognitive Load
Relates to specific aspects of the business domain
(aka. „value added“ thinking)
https://teamtopologies.com
Die Themen und der Fahrplan für heute ...
QAware | 8
■ Continuous Everything!
Kubernetes als Cloud-native Software Delivery Platform.
■ Kubernetes Application Orchestration Patterns
■ Nutzung des Kubernetes APIs und Events als Basis für Automatisierung
und Erweiterung
■ Cross-Cutting Concerns (Security, Governance, Configuration)
mit Admission Controllern
■ Erweiterung des Kubernetes APIs mit Custom Resources und
Operatoren
https://github.com/qaware/k8s-experts-day
Das Platform Team als Key Enabler für hohe Produktivität in
den DevOps Teams.
QAware | 10
■ Verantwortlich für die Plattform um Teams bei der
Software Delivery zu unterstützen.
■ Die Plattform vereinfacht die sonst komplexen
Technologien und reduziert die Cognitive Load.
– Standardisierung
– Self-Service
■ Software wie vom Fließband ist das Ziel!
https://hennyportman.wordpress.com/2020/05/25/review-team-topologies/
Kubernetes als Basis Plattform für effizientes Cloud-native
Development. Continuous Everything.
QAware | 11
■ Kubernetes ist mehr als nur ein Container Orchestrator. Es wird zum Software Fließband!
■ Build-Ship-Run. Developer Control Planes vereinfachen und unterstützen die Entwicklung, das
Deployment und den Betrieb (https://www.getambassador.io/developer-control-plane)
■ 100% Remote K8s-based IDEs mit Gitpods, Eclipse Che et.al
■ K8s-native Container Image Builds mit Kaniko, K8s-native Pipelines mit Tools wie Tekton, et.al.
■ GitOps-basierte Deployments mit Tools wie ArgoCD, Flux, ...
■ Cloud-native Application Staging und Lifecycle Orchestration mit Tools wie Keptn, …
■ Möglichkeit zur einfache Kombination aus K8s Primitives mit bekannten Open Source Bausteinen
– Security Test mit ZED Attach Proxy - https://github.com/qaware/continuous-zapk8s
– Performance Test mit K6+Grafana+InfluxDB - https://github.com/qaware/continuous-k6k8s
– UI Tests mit Geb+Selenium - https://github.com/qaware/continuous-atdd
https://landscape.cncf.io/card-mode?category=continuous-integration-delivery&grouping=category
Kubernetes als Software Architektur Treiber
K8s Application Orchestration Patterns
QAware | 12
Sidecar Container
Decorated Container Behaviour
■ Log Extraction / Reformatting
(fluentd, file beat)
■ Scheduling (cron, quartz)
Ambassador Container
Proxy Communication
■ TLS Tunnel (ghostunnel, Istio)
■ Circuit Breaking (linked, Istio)
■ Request Monitoring (linked, Istio)
Adapter Container
Standardized Ops Interfaces
■ Monitoring (Prometheus)
■ Configuration (ConfigMaps,
Secrets, …)
Das Kubernetes API als Basis für DevOps Automatisierung
und eigene Erweiterungen.
QAware | 13
■ Das Kubernetes API erlaubt das Abfragen, Verändern und Löschen aller bekannten (Default und
Custom) Kubernetes Objekte.
■ Kubernetes ist eine verteilte State Machine. Watcher auf Change Events (ADD, MODIFY, DELETE)
sind ein mächtiges Werkzeug und die Basis für Custom Logik und Erweiterungen.
■ 3 Zugriffswege: kubectl, REST API und programmatisch
– Kubernetes stellt zahlreiche offizielle Client Bibliotheken bereit, u.A. für Go, Java, Python, …
– Für nicht offiziell unterstützte Sprachen gibt es zahlreiche Community Client Libs
■ API Docs - https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/
Exkurs: Modern K8s Infrastructure as Code mit Pulumi.
QAware | 14
■ Declarative vs. Imperative. But why?
■ No intermediary formats. Direct usage of provided APIs.
■ Tame overall complexity. One consistent approach to cloud engineering for Docker,
many cloud providers and Kubernetes.
■ No breach between application development and DevOps engineering. Rich
programmable cloud interfaces with abstractions and reusable packages.
■ Apply engineering practices to infrastructure code: automation, modularity, testing.
■ Several converters available: kube2pulumi, tf2pulumi, arm2pulumi, crd2pulumi
Cross-Cutting Concerns via Admission Controllers
QAware | 15
■ Admission Controllers are like (dynamic) plugins for Kubernetes
■ Security: increase security by mandating a reasonable security baseline across an entire
namespace or cluster, e.g. PodSecurityPolicy, OPA.
■ Governance: apply and enforce the adherence to best practices, e.g. good labels,
annotations, resource limits, probes.
■ Configuration Management: validate configuration of objects and prevent obvious
misconfigurations from hitting the cluster.
■ More than 30 admission controllers shipped with Kubernetes, incl. the
MutatingAdmissionWebhook and ValidatingAdmissionWebhook
Mutating and Validating Admission Explained
QAware | 16
TLS TLS
POST /mutate POST /validate
Kubernetes API Extensions with Custom Resources
QAware | 17
■ User defined extensions of the Kubernetes APIs
■ Allow the abstraction of complex application constructs and concepts
■ Definition solely via CustomResourceDefinitions
■ Structure definition via OpenAPI v3.0 Validation Schema
■ Default Support for several API Features: CRUD, Watch, Discovery,
json-patch, merge-patch, Admission Webhooks, Metadata, RBAC, …
■ Versioning und Conversion supported via Webhooks
QAware | 18
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
metadata:
labels:
app: nginx
environment: integration
spec:
containers:
- name: nginx
image: nginx:1.19.4-alpine
ports:
- containerPort: 80
# probe definitions
# resource constraints
# volumes and mounts
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
type: LoadBalancer
ports:
- port: 80
protocol: TCP
selector:
app: nginx
apiVersion:
k8s.qaware.de/v1alpha1
kind: Microservice
metadata:
name: microservice-example
labels:
app: nginx
spec:
image: nginx:1.19.4-alpine
replicas: 2
serviceType: LoadBalancer
ports:
- 80
+ =
QAware | 19
Operator.
- Do stuff to my Kubernetes.
What are operators?
QAware | 20
■ Operators are codified Ops procedures!
■ Operators are the path towards Zero-Ops. They enable
auto-updating, self-monitoring and self-healing infrastructure
and applications.
■ The concept was coined in the Kubernetes world. It’s now been
adopted and used widespread in the cloud native world.
■ Examples: OKD, Sealed Secrets, Kube Monkey, Weave Flux, ...
Kubernetes Operators Explained
QAware | 21
https://github.com/qaware/go-for-operations
https://github.com/lreimer/graal-operators
Projekt Setup & Scaffolding mit dem Operator SDK
QAware | 23
qaware.de
QAware GmbH
Aschauer Straße 32
81549 München
Tel. +49 89 232315-0
info@qaware.de
twitter.com/qaware
linkedin.com/company/qaware-gmbh
xing.com/companies/qawaregmbh
slideshare.net/qaware
github.com/qaware

Weitere ähnliche Inhalte

PPTX
Kubernetes Basics
Rishabh Kumar
 
PDF
Kubernetes - A Comprehensive Overview
Bob Killen
 
PDF
Kubernetes Application Deployment with Helm - A beginner Guide!
Krishna-Kumar
 
PDF
Deploying your first application with Kubernetes
OVHcloud
 
PPTX
Introduction to helm
Jeeva Chelladhurai
 
PDF
Helm 3
Matthew Farina
 
PDF
Kubernetes Basics
Eueung Mulyana
 
PPTX
GitOps w/argocd
Jean-Philippe Bélanger
 
Kubernetes Basics
Rishabh Kumar
 
Kubernetes - A Comprehensive Overview
Bob Killen
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Krishna-Kumar
 
Deploying your first application with Kubernetes
OVHcloud
 
Introduction to helm
Jeeva Chelladhurai
 
Kubernetes Basics
Eueung Mulyana
 
GitOps w/argocd
Jean-Philippe Bélanger
 

Was ist angesagt? (20)

PPTX
Autoscaling in Kubernetes
Hrishikesh Deodhar
 
PDF
Intro to Kubernetes
Joonathan Mägi
 
PPTX
[넥슨] kubernetes 소개 (2018)
용호 최
 
PDF
Kubernetes 101
Crevise Technologies
 
PDF
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
PDF
Gitops: the kubernetes way
sparkfabrik
 
PPTX
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
PDF
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
PDF
Introduction to Kubernetes Workshop
Bob Killen
 
PDF
Kubernetes
Meng-Ze Lee
 
PPTX
01. Kubernetes-PPT.pptx
TamalBanerjee16
 
PPTX
Kubernetes
Henry He
 
PDF
Introduction to kubernetes
Raffaele Di Fazio
 
PDF
An overview of the Kubernetes architecture
Igor Sfiligoi
 
PPTX
Introduction to Kubernetes
Paris Apostolopoulos
 
PDF
Gitops: a new paradigm for software defined operations
Mariano Cunietti
 
PPTX
GitOps - Modern best practices for high velocity app dev using cloud native t...
Weaveworks
 
PDF
Kubernetes Architecture - beyond a black box - Part 1
Hao H. Zhang
 
ODP
Kubernetes Architecture
Knoldus Inc.
 
PPTX
쿠버네티스 ( Kubernetes ) 소개 자료
Opennaru, inc.
 
Autoscaling in Kubernetes
Hrishikesh Deodhar
 
Intro to Kubernetes
Joonathan Mägi
 
[넥슨] kubernetes 소개 (2018)
용호 최
 
Kubernetes 101
Crevise Technologies
 
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
Gitops: the kubernetes way
sparkfabrik
 
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Introduction to Kubernetes Workshop
Bob Killen
 
Kubernetes
Meng-Ze Lee
 
01. Kubernetes-PPT.pptx
TamalBanerjee16
 
Kubernetes
Henry He
 
Introduction to kubernetes
Raffaele Di Fazio
 
An overview of the Kubernetes architecture
Igor Sfiligoi
 
Introduction to Kubernetes
Paris Apostolopoulos
 
Gitops: a new paradigm for software defined operations
Mariano Cunietti
 
GitOps - Modern best practices for high velocity app dev using cloud native t...
Weaveworks
 
Kubernetes Architecture - beyond a black box - Part 1
Hao H. Zhang
 
Kubernetes Architecture
Knoldus Inc.
 
쿠버네티스 ( Kubernetes ) 소개 자료
Opennaru, inc.
 
Anzeige

Ähnlich wie Kubernetes ist so viel mehr als ein Container Orchestrierer (20)

PDF
Make Developers Fly: Principles for Platform Engineering
QAware GmbH
 
PDF
Cloud Infrastructure with Crossplane
QAware GmbH
 
PDF
A Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConf
Mario-Leander Reimer
 
PDF
A Hitchhiker's Guide to the Cloud Native Stack
QAware GmbH
 
PDF
Make Developers Fly: Principles for Platform Engineering
QAware GmbH
 
PDF
Enterprise Cloud Native ist das neue Normal
QAware GmbH
 
PDF
DACHNUG50 CNX3 Monitoring.pdf
DNUG e.V.
 
PDF
Per Anhalter zu Cloud-nativen API Gateways
QAware GmbH
 
PDF
Kontinuierliches (Nicht)-Funktionales Testen von Microservices auf K8s
QAware GmbH
 
PDF
Steinzeit war gestern! Wege der Cloud-nativen Evolution.
QAware GmbH
 
PDF
Enterprise Cloud Native ist das neue Normal
QAware GmbH
 
PDF
50 Shades of K8s Autoscaling #JavaLand24.pdf
QAware GmbH
 
PDF
Cloud Native Migration: Wie IT-Landschaften ihren Weg auf eine Cloud-Native-P...
QAware GmbH
 
PDF
Boost your APEX Deployment and Provisioning with Docker
Steven Grzbielok
 
PDF
Cloud Observability mit Loki, Prometheus, Tempo und Grafana
QAware GmbH
 
PDF
Holistische Sicherheit für Microservice Architekturen
QAware GmbH
 
PPTX
ANEO | Automatisierung mit RedHat Ansible
CarolineAuerMarcher
 
PDF
TechTalkThursday 02.03.2017: Container-Orchestrierung mit OpenShift - Unser W...
nine
 
PDF
In den sicheren Hafen jax2020
Stephan Kaps
 
PDF
K8s-native Daten-Pipelines mit Argo Workflows und Events
QAware GmbH
 
Make Developers Fly: Principles for Platform Engineering
QAware GmbH
 
Cloud Infrastructure with Crossplane
QAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #ContainerConf
Mario-Leander Reimer
 
A Hitchhiker's Guide to the Cloud Native Stack
QAware GmbH
 
Make Developers Fly: Principles for Platform Engineering
QAware GmbH
 
Enterprise Cloud Native ist das neue Normal
QAware GmbH
 
DACHNUG50 CNX3 Monitoring.pdf
DNUG e.V.
 
Per Anhalter zu Cloud-nativen API Gateways
QAware GmbH
 
Kontinuierliches (Nicht)-Funktionales Testen von Microservices auf K8s
QAware GmbH
 
Steinzeit war gestern! Wege der Cloud-nativen Evolution.
QAware GmbH
 
Enterprise Cloud Native ist das neue Normal
QAware GmbH
 
50 Shades of K8s Autoscaling #JavaLand24.pdf
QAware GmbH
 
Cloud Native Migration: Wie IT-Landschaften ihren Weg auf eine Cloud-Native-P...
QAware GmbH
 
Boost your APEX Deployment and Provisioning with Docker
Steven Grzbielok
 
Cloud Observability mit Loki, Prometheus, Tempo und Grafana
QAware GmbH
 
Holistische Sicherheit für Microservice Architekturen
QAware GmbH
 
ANEO | Automatisierung mit RedHat Ansible
CarolineAuerMarcher
 
TechTalkThursday 02.03.2017: Container-Orchestrierung mit OpenShift - Unser W...
nine
 
In den sicheren Hafen jax2020
Stephan Kaps
 
K8s-native Daten-Pipelines mit Argo Workflows und Events
QAware GmbH
 
Anzeige

Mehr von QAware GmbH (20)

PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
PDF
Frontends mit Hilfe von KI entwickeln.pdf
QAware GmbH
 
PDF
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
QAware GmbH
 
PDF
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
QAware GmbH
 
PPTX
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
QAware GmbH
 
PDF
Down the Ivory Tower towards Agile Architecture
QAware GmbH
 
PDF
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
QAware GmbH
 
PDF
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
QAware GmbH
 
PDF
Was kommt nach den SPAs
QAware GmbH
 
PDF
Cloud Migration mit KI: der Turbo
QAware GmbH
 
PDF
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
QAware GmbH
 
PDF
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
QAware GmbH
 
PDF
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
QAware GmbH
 
PDF
Kubernetes with Cilium in AWS - Experience Report!
QAware GmbH
 
PDF
50 Shades of K8s Autoscaling
QAware GmbH
 
PDF
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
QAware GmbH
 
PDF
Service Mesh Pain & Gain. Experiences from a client project.
QAware GmbH
 
PDF
50 Shades of K8s Autoscaling
QAware GmbH
 
PDF
Blue turns green! Approaches and technologies for sustainable K8s clusters.
QAware GmbH
 
PDF
Per Anhalter zu Cloud Nativen API Gateways
QAware GmbH
 
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
Frontends mit Hilfe von KI entwickeln.pdf
QAware GmbH
 
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
QAware GmbH
 
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
QAware GmbH
 
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
QAware GmbH
 
Down the Ivory Tower towards Agile Architecture
QAware GmbH
 
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
QAware GmbH
 
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
QAware GmbH
 
Was kommt nach den SPAs
QAware GmbH
 
Cloud Migration mit KI: der Turbo
QAware GmbH
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
QAware GmbH
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
QAware GmbH
 
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
QAware GmbH
 
Kubernetes with Cilium in AWS - Experience Report!
QAware GmbH
 
50 Shades of K8s Autoscaling
QAware GmbH
 
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
QAware GmbH
 
Service Mesh Pain & Gain. Experiences from a client project.
QAware GmbH
 
50 Shades of K8s Autoscaling
QAware GmbH
 
Blue turns green! Approaches and technologies for sustainable K8s clusters.
QAware GmbH
 
Per Anhalter zu Cloud Nativen API Gateways
QAware GmbH
 

Kubernetes ist so viel mehr als ein Container Orchestrierer

  • 1. qaware.de Kubernetes ist so viel mehr als ein Container Orchestrierer Mario-Leander Reimer [email protected] @LeanderReimer API SPI
  • 2. 2 Mario-Leander Reimer Principal Software Architect @LeanderReimer #cloudnativenerd #qaware
  • 3. Anno 2016 ... QAware | 3 https://speakerdeck.com/lreimer/kubernetes-101-and-fun https://github.com/qaware/kubepad
  • 4. Das Kubernetes ABC ist mittlerweile Commodity. QAware | 4
  • 5. 10:04 PM - 27. November 2017 5:38 PM - 24. Februar 2019
  • 6. Kubernetes ist eine flexibel erweiterbare Plattform mit zahlreichen APIs und SPIs die deklarativ aber vor allem programmatisch genutzt werden können um neue Abstraktionen und eigene Erweiterungen zu realisieren.
  • 7. Too much cognitive load will become a bottleneck for fast flow and high productivity. QAware | 7 ■ Intrinsic Cognitive Load Relates to fundamental aspects and knowledge in the problem space (e.g. used languages, APIs, frameworks) ■ Extraneous Cognitive Load Relates to the environment (e.g. deployment, configuration, console commands) ■ Germane Cognitive Load Relates to specific aspects of the business domain (aka. „value added“ thinking) https://teamtopologies.com
  • 8. Die Themen und der Fahrplan für heute ... QAware | 8 ■ Continuous Everything! Kubernetes als Cloud-native Software Delivery Platform. ■ Kubernetes Application Orchestration Patterns ■ Nutzung des Kubernetes APIs und Events als Basis für Automatisierung und Erweiterung ■ Cross-Cutting Concerns (Security, Governance, Configuration) mit Admission Controllern ■ Erweiterung des Kubernetes APIs mit Custom Resources und Operatoren
  • 10. Das Platform Team als Key Enabler für hohe Produktivität in den DevOps Teams. QAware | 10 ■ Verantwortlich für die Plattform um Teams bei der Software Delivery zu unterstützen. ■ Die Plattform vereinfacht die sonst komplexen Technologien und reduziert die Cognitive Load. – Standardisierung – Self-Service ■ Software wie vom Fließband ist das Ziel! https://hennyportman.wordpress.com/2020/05/25/review-team-topologies/
  • 11. Kubernetes als Basis Plattform für effizientes Cloud-native Development. Continuous Everything. QAware | 11 ■ Kubernetes ist mehr als nur ein Container Orchestrator. Es wird zum Software Fließband! ■ Build-Ship-Run. Developer Control Planes vereinfachen und unterstützen die Entwicklung, das Deployment und den Betrieb (https://www.getambassador.io/developer-control-plane) ■ 100% Remote K8s-based IDEs mit Gitpods, Eclipse Che et.al ■ K8s-native Container Image Builds mit Kaniko, K8s-native Pipelines mit Tools wie Tekton, et.al. ■ GitOps-basierte Deployments mit Tools wie ArgoCD, Flux, ... ■ Cloud-native Application Staging und Lifecycle Orchestration mit Tools wie Keptn, … ■ Möglichkeit zur einfache Kombination aus K8s Primitives mit bekannten Open Source Bausteinen – Security Test mit ZED Attach Proxy - https://github.com/qaware/continuous-zapk8s – Performance Test mit K6+Grafana+InfluxDB - https://github.com/qaware/continuous-k6k8s – UI Tests mit Geb+Selenium - https://github.com/qaware/continuous-atdd https://landscape.cncf.io/card-mode?category=continuous-integration-delivery&grouping=category
  • 12. Kubernetes als Software Architektur Treiber K8s Application Orchestration Patterns QAware | 12 Sidecar Container Decorated Container Behaviour ■ Log Extraction / Reformatting (fluentd, file beat) ■ Scheduling (cron, quartz) Ambassador Container Proxy Communication ■ TLS Tunnel (ghostunnel, Istio) ■ Circuit Breaking (linked, Istio) ■ Request Monitoring (linked, Istio) Adapter Container Standardized Ops Interfaces ■ Monitoring (Prometheus) ■ Configuration (ConfigMaps, Secrets, …)
  • 13. Das Kubernetes API als Basis für DevOps Automatisierung und eigene Erweiterungen. QAware | 13 ■ Das Kubernetes API erlaubt das Abfragen, Verändern und Löschen aller bekannten (Default und Custom) Kubernetes Objekte. ■ Kubernetes ist eine verteilte State Machine. Watcher auf Change Events (ADD, MODIFY, DELETE) sind ein mächtiges Werkzeug und die Basis für Custom Logik und Erweiterungen. ■ 3 Zugriffswege: kubectl, REST API und programmatisch – Kubernetes stellt zahlreiche offizielle Client Bibliotheken bereit, u.A. für Go, Java, Python, … – Für nicht offiziell unterstützte Sprachen gibt es zahlreiche Community Client Libs ■ API Docs - https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/
  • 14. Exkurs: Modern K8s Infrastructure as Code mit Pulumi. QAware | 14 ■ Declarative vs. Imperative. But why? ■ No intermediary formats. Direct usage of provided APIs. ■ Tame overall complexity. One consistent approach to cloud engineering for Docker, many cloud providers and Kubernetes. ■ No breach between application development and DevOps engineering. Rich programmable cloud interfaces with abstractions and reusable packages. ■ Apply engineering practices to infrastructure code: automation, modularity, testing. ■ Several converters available: kube2pulumi, tf2pulumi, arm2pulumi, crd2pulumi
  • 15. Cross-Cutting Concerns via Admission Controllers QAware | 15 ■ Admission Controllers are like (dynamic) plugins for Kubernetes ■ Security: increase security by mandating a reasonable security baseline across an entire namespace or cluster, e.g. PodSecurityPolicy, OPA. ■ Governance: apply and enforce the adherence to best practices, e.g. good labels, annotations, resource limits, probes. ■ Configuration Management: validate configuration of objects and prevent obvious misconfigurations from hitting the cluster. ■ More than 30 admission controllers shipped with Kubernetes, incl. the MutatingAdmissionWebhook and ValidatingAdmissionWebhook
  • 16. Mutating and Validating Admission Explained QAware | 16 TLS TLS POST /mutate POST /validate
  • 17. Kubernetes API Extensions with Custom Resources QAware | 17 ■ User defined extensions of the Kubernetes APIs ■ Allow the abstraction of complex application constructs and concepts ■ Definition solely via CustomResourceDefinitions ■ Structure definition via OpenAPI v3.0 Validation Schema ■ Default Support for several API Features: CRUD, Watch, Discovery, json-patch, merge-patch, Admission Webhooks, Metadata, RBAC, … ■ Versioning und Conversion supported via Webhooks
  • 18. QAware | 18 apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels: app: nginx replicas: 2 template: metadata: labels: app: nginx environment: integration spec: containers: - name: nginx image: nginx:1.19.4-alpine ports: - containerPort: 80 # probe definitions # resource constraints # volumes and mounts apiVersion: v1 kind: Service metadata: name: nginx-service spec: type: LoadBalancer ports: - port: 80 protocol: TCP selector: app: nginx apiVersion: k8s.qaware.de/v1alpha1 kind: Microservice metadata: name: microservice-example labels: app: nginx spec: image: nginx:1.19.4-alpine replicas: 2 serviceType: LoadBalancer ports: - 80 + =
  • 19. QAware | 19 Operator. - Do stuff to my Kubernetes.
  • 20. What are operators? QAware | 20 ■ Operators are codified Ops procedures! ■ Operators are the path towards Zero-Ops. They enable auto-updating, self-monitoring and self-healing infrastructure and applications. ■ The concept was coined in the Kubernetes world. It’s now been adopted and used widespread in the cloud native world. ■ Examples: OKD, Sealed Secrets, Kube Monkey, Weave Flux, ...
  • 23. Projekt Setup & Scaffolding mit dem Operator SDK QAware | 23
  • 24. qaware.de QAware GmbH Aschauer Straße 32 81549 München Tel. +49 89 232315-0 [email protected] twitter.com/qaware linkedin.com/company/qaware-gmbh xing.com/companies/qawaregmbh slideshare.net/qaware github.com/qaware