6. Michael Frembs
Bachelor & Master of Science Informatik
an der FAU Erlangen-Nürnberg
Oktober 2007 bis Dezember 2012
(zuletzt) Teamlead Cloud-native & API
bei ARS Computer & Consulting
März 2013 bis April 2020
Cloud Platform Architect
bei den Stadtwerken München
seit Mai 2020
7. Prometheus & Grafana
OpenSource, Teil der CNCF
Time-Series-Database
Gut für Metriken
OpenSource, Teil der CNCF
Dashboards mit Graphen
Gut um eine Übersicht zu erhalten
CNCF = Cloud Native Computing Foundation
8. Setup
(lokales Kubernetes)
Software
Windows 10
WSL2 mit Ubuntu 20.04
Docker Desktop
KinD mit Kubernetes v19.1
Anleitung:
https://kubernetes.io/blog/2020/05/2
1/wsl-docker-kubernetes-on-the-
windows-desktop/
Hardware
16 GB RAM
Ryzen 7 PRO 4750U
9. Pod Deployer Types
App: foo
Application: bar
App: foo
service: foo
Pod
Bündelt alle Pods mit
bestimmtem Label
Erzeugt Pods
„Pod Deployer“
Deployment
StatefulSet
DaemonSet
(Cron)Job
Service
Pod Deployer
11. Controller Beispiel: Replica Set
Habe ich
N Pods?
Lösche 1 Pod
Erstelle 1 Pod
Gewünschter
Zustand
Mehr als N Pods
Weniger als N Pods
Angelehnt an: https://octetz.com/docs/2019/2019-10-13-controllers-and-operators/
Die Darstellung ist
nur beispielhaft und
entspricht nicht der
Implementierung
des replicaset-
controllers
12. Custom Resources
Erweiterbarkeit / Plugin
Werden über eine Custom Resource
Definition (CRD) erstellt
Dynamic Registration
Benutzbar genauso wie built-in
Ressources wie Pods oder
Deployments
13. Operator
An Operator is an application-specific
controller that extends the Kubernetes
API to create, configure and manage
instances of complex stateful
applications on behalf of a Kubernetes
user.
It builds upon the basic Kubernetes
resource and controller concepts, but
also includes domain or application-
specific knowledge to automate
common tasks better managed by
computers.
https://coreos.com/blog/introducing-operators.html
14. Beispiel: Prometheus Operator
The Prometheus Operator provides Kubernetes
native deployment and management of
Prometheus and related monitoring components.
The purpose of this project is to simplify and
automate the configuration of a Prometheus
based monitoring stack for Kubernetes clusters.
The Prometheus operator includes, but is not
limited to, the following features:
Kubernetes Custom Resources: Use
Kubernetes custom resources to deploy and
manage Prometheus, Alertmanager, and related
components.
Simplified Deployment Configuration:
Configure the fundamentals of Prometheus like
versions, persistence, retention policies, and
replicas from a native Kubernetes resource.
Prometheus Target Configuration:
Automatically generate monitoring target
configurations based on familiar Kubernetes
label queries; no need to learn a Prometheus
specific configuration language.
https://github.com/prometheus-operator/prometheus-operator
20. Service Accounts
Authentication
Normal User
Werden nicht von K8s verwaltet
Z.B. über LDAP oder OpenID Connect
Service Accounts
Werden per API-Call erstellt
Können mit Pods verknüpft werden
Token werden im Secret automatisch
erstellt (dauerhaft)
21. Role Base Access Control
Authorization
(Cluster)Role
Definition der Rechte auf
Ressourcenebene
Angabe der Rechte nach Verben
Entweder Namespacegebunden oder
Clusterübergreifend
(Cluster)RoleBinding
Verknüpfung einer Rolle mit einem
Nutzer (sowohl Normal User als auch
Service Account)