Heise, Mastering Kubernetes 2021,15. Juli 2021, online: Vortrag von Mario-Leander Reimer (@LeanderReimer, Principal Software Architect bei QAware)
== Bitte Folien herunterladen, falls sie unscharf sein sollten! =
Abstract:
Wer an Kubernetes denkt, sieht erstmal die Features zur Orchestrierung von Containern auf vielen Hosts. Allerdings kann Kubernetes so viel mehr, was sowohl bei Dev- als auch bei Ops-Aufgaben helfen kann.
In diesem Vortrag werden die Fähigkeiten näher beleuchtet, die sonst ein Schattendasein fristen.
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
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
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
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, ...