# Kubernetes verstehen *Nicholas Dille, Haufe Group*
Docker Captain
[@nicholasdille](https://twitter.com/nicholasdille)
[@nicholasdille@freiburg.social](https://freiburg.social/@nicholasdille)
## Concepts
## Imperative vs. declarative
## Labels
## Lifecycle Applications require lifecycle management: - Deploy / remove - Upgrade / downgrade - Scale up / down - Restart ### Do not update pods directly Updating pods results in a container restart Essentially only the image can be updated
## Architecture
## Networking
## Self-hosted cluster Overlay networking, e.g. IP-in-IP encapsulation Nodes have routable and private IP addresses Pods/services have private IP addresses ![](120_kubernetes/network/overlay.drawio.svg)
## Managed cluster (cloud) Flat network Nodes, pods and services have routable IP addresses Pods and services are directly accessible from outside the cluster Integration with cloud services possible
## Accessing pods
## Load balancer ```yaml apiVersion: v1 kind: Service metadata: name: my-service spec: type: LoadBalancer ``` Special type for a `Service` Requires integration with cloud provider External load balancer is responsible for routing traffic to services Annotations are used to configure external load balancer Requires flat network instead of overlay network ### No demo Too much effort to setup :-(
## Summary
-
Labels provide context and select resources -
Pod lifecycle is managed my multiple resources -
Kubernetes architecture allows for highly available setups -
The Kubernetes API server is **the** central component -
Ingress controllers provide access to services ### Upcoming events
~~2023-10-11: Kubernetes [verstehen](https://heise-academy.de/webinare/kubernetes1023_konzepte)~~ 2023-10-18: Kubernetes [automatisieren](https://heise-academy.de/webinare/kubernetes1023_continous-deployment) 2023-10-25: Kubernetes [überwachen](https://heise-academy.de/webinare/kubernetes1023_monitoring) 2023-11-03: Kubernetes [absichern](https://heise-academy.de/webinare/kubernetes1023_security) 2023-11-14: [ContainerConf](https://www.containerconf.de/): Workshop [GitLab CI](https://www.containerconf.de/veranstaltung-20671-0-ci-cd-mit-gitlab.html), Talk [OCI 1.1](https://www.containerconf.de/veranstaltung-21037-0-container-registries-als-generische-artefaktspeicher--was-oci-1.1-neues-bringt.html), Talk [Dependency Updates](https://www.containerconf.de/veranstaltung-21033-0-nie-wieder-veraltete-dependencies-wie-sich-sicherheitsluecken-von-selbst-schliessen.html) 2023-11-23 / 2023-11-30 / 2023-11-07: Workshops [GitLab Ops](https://heise-academy.de/schulungen/einfuehrung-in-gitlab) (1 day) and [GitLab CI](https://heise-academy.de/schulungen/cicd-gitlab) (2 days)