More Related Content

Similar to Kubernetes ist so viel mehr als ein Container Orchestrierer(20)

More from QAware GmbH(20)

Recently uploaded(20)

Kubernetes ist so viel mehr als ein Container Orchestrierer

  1. qaware.de Kubernetes ist so viel mehr als ein Container Orchestrierer Mario-Leander Reimer mario-leander.reimer@qaware.de @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
  9. https://github.com/qaware/k8s-experts-day
  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, ...
  21. Kubernetes Operators Explained QAware | 21
  22. https://github.com/qaware/go-for-operations https://github.com/lreimer/graal-operators
  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 info@qaware.de twitter.com/qaware linkedin.com/company/qaware-gmbh xing.com/companies/qawaregmbh slideshare.net/qaware github.com/qaware