Slide 1

Slide 1 text

@BastianHofmann From source to Kubernetes In 30 Minutes Bastian Hofmann [email protected]

Slide 2

Slide 2 text

CI/CD

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Container orchestration platform

Slide 7

Slide 7 text

Deploy, run and scale your services in isolated containers

Slide 8

Slide 8 text

Your application is bundled in an image

Slide 9

Slide 9 text

The image contains everything the application needs to run

Slide 10

Slide 10 text

The image is started in an isolated container

Slide 11

Slide 11 text

No vendor lock in

Slide 12

Slide 12 text

Standardized APIs

Slide 13

Slide 13 text

Your laptop

Slide 14

Slide 14 text

Bare metal

Slide 15

Slide 15 text

Cloud Providers

Slide 16

Slide 16 text

And if you don't want to install and maintain Kubernetes yourself

Slide 17

Slide 17 text

Managed Kubernetes

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

So we have code, how do we get this into Kubernetes?

Slide 20

Slide 20 text

Angular demo application

Slide 21

Slide 21 text

Demo

Slide 22

Slide 22 text

We have to

Slide 23

Slide 23 text

Build a docker image

Slide 24

Slide 24 text

Contains everything that the service needs to run

Slide 25

Slide 25 text

Make the build as fast as possible

Slide 26

Slide 26 text

Make the image as small as possible

Slide 27

Slide 27 text

Demo

Slide 28

Slide 28 text

Tell Kubernetes to

Slide 29

Slide 29 text

Start containers

Slide 30

Slide 30 text

In Kubernetes

Slide 31

Slide 31 text

• A group of 1 or more containers • Same port space • Within a Pod: communication over localhost • Every container has their own filesystem • Every Pod has it's own IP • All Pods can talk with each other • IPs change all the time Pod

Slide 32

Slide 32 text

Deployment

Slide 33

Slide 33 text

LoadBalancer

Slide 34

Slide 34 text

Everything in Kubernetes is a resource (document) defined in YAML

Slide 35

Slide 35 text

Demo

Slide 36

Slide 36 text

Also all those YAML files are not nice

Slide 37

Slide 37 text

Helm

Slide 38

Slide 38 text

Also we need

Slide 39

Slide 39 text

DNS

Slide 40

Slide 40 text

TLS

Slide 41

Slide 41 text

Monitoring

Slide 42

Slide 42 text

CI/CD pipeline

Slide 43

Slide 43 text

Make use of Kubernetes "magic"

Slide 44

Slide 44 text

Demo

Slide 45

Slide 45 text

Magic recap

Slide 46

Slide 46 text

LoadBalancers

Slide 47

Slide 47 text

Automatically creates a highly available LoadBalancer with a public IP address

Slide 48

Slide 48 text

Ingress controller

Slide 49

Slide 49 text

The ingress controller (nginx) listens on routing rules in Ingress Resources and configures itself to route incoming traffic to the correct running and healthy pods

Slide 50

Slide 50 text

cert-manager

Slide 51

Slide 51 text

Cert-manager listens on Ingress Resources and if they need TLS, requests a certificate from LetsEncrypt

Slide 52

Slide 52 text

external-dns

Slide 53

Slide 53 text

External-DNS listens on Ingress Resources and creates DNS entries

Slide 54

Slide 54 text

Sealed Secrets

Slide 55

Slide 55 text

Secrets are stored encrypted in Git and decrypted inside of the cluster

Slide 56

Slide 56 text

Prometheus

Slide 57

Slide 57 text

Kubernetes and Node metrics are automatically included

Slide 58

Slide 58 text

Kubernetes and Node alerts are automatically included

Slide 59

Slide 59 text

Kubernetes and Node dashboards are automatically included

Slide 60

Slide 60 text

Scraping targets can be automatically discovered

Slide 61

Slide 61 text

Service Meshes

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

Recommendation: Start playing around with Kubernetes

Slide 64

Slide 64 text

Alternatives

Slide 65

Slide 65 text

Flux

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

Knative

Slide 68

Slide 68 text

Kubernetes-based platform to deploy and manage modern serverless workloads

Slide 69

Slide 69 text

Tekton CD

Slide 70

Slide 70 text

CI that runs completely within Kubernetes with Kubernetes Custom Resources

Slide 71

Slide 71 text

Resources

Slide 72

Slide 72 text

https:/ /gitlab.com/bashofmann/ angular-test-app

Slide 73

Slide 73 text

https:/ /gitlab.com/bashofmann/ angular-test-app-finished

Slide 74

Slide 74 text

https:/ /github.com/syseleven/ golem-workshop

Slide 75

Slide 75 text

[email protected] https:/ /twitter.com/BastianHofmann http:/ /speakerdeck.com/u/bastianhofmann