Slide 1

Slide 1 text

Automating Kubernetes Cluster Operations with Operators by Timo Derstappen

Slide 2

Slide 2 text

Running Kubernetes in Kubernetes

Slide 3

Slide 3 text

Are you in desired state?

Slide 4

Slide 4 text

Overview 1. Background / Motivation 2. Architecture 3. Operators 4. Outlook

Slide 5

Slide 5 text

Background At Giant Swarm we manage Kubernetes clusters for customers 24/7. Both on bare metal and in the cloud.

Slide 6

Slide 6 text

Distributed Team People are in 6 different european countries Looking for more platform engineers and SREs

Slide 7

Slide 7 text

Kubernetes as a Service (KaaS) Own DC in Frankfurt, Germany Full access to clusters

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

On-premises KaaS Current focus is to manage Kubernetes in the DCs or AWS accounts of the customers itself.

Slide 10

Slide 10 text

Open Source Our tooling is open-source and we are working with the community to improve kubernetes operations.

Slide 11

Slide 11 text

Multiple Clusters "Soft" multi-tenancy not enough in enterprise context PCI-compliance, privacy laws, etc. Different environments: separation of dev, test, prod Test new K8s versions

Slide 12

Slide 12 text

People must come to things in their own time, in their own way, for their own reasons, or they never truly come at all. - Dee Hock

Slide 13

Slide 13 text

RBAC, NetworkPolicies FTW We encourage to use the features and integrate. Small clusters make little sense Support while processes need to be adapted Kubernetes matures - trust over time

Slide 14

Slide 14 text

Introducing: Giantnetes

Slide 15

Slide 15 text

Motivation Rather obvious. If you provide others with Kubernetes because you think the building blocks are right, you just have to use it too.

Slide 16

Slide 16 text

De nition G8s: Giantnetes K8s: Kubernetes == Guest cluster

Slide 17

Slide 17 text

Overview 1. Background / Motivation 2. Architecture 3. Operators 4. Outlook

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

Immutability Container linux (Hosts and Guests) Continuous pipeline (Container build, registry, kubernetes)

Slide 21

Slide 21 text

Reproducable builds and deployments at any point in time Architect ( ) Draughtsman ( ) https://github.com/giantswarm/architect https://github.com/giantswarm/draughtsman

Slide 22

Slide 22 text

Every manual change is ephemeral

Slide 23

Slide 23 text

Mean time to recovery!

Slide 24

Slide 24 text

Networking Flannel/VPC network between guest cluster nodes Calico between containers Network policy controller

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

Certi cates Each cluster has its own root ca Using PKI backends in Vault Certificates are rotated every day

Slide 30

Slide 30 text

Certi cates #2 Kubernetes components use mutual TLS Client certificates are used for RBAC

Slide 31

Slide 31 text

Overview 1. Background / Motivation 2. Architecture 3. Operators 4. Outlook

Slide 32

Slide 32 text

Why are we doing this again? Fully automate deployment of kubernetes Continuously manage desired state of the clusters

Slide 33

Slide 33 text

Iterations of the platform 1. K8s clusters via systemd units over fleet 2. K8s manifests to create K8s clusters used as templates 3. Writing operators

Slide 34

Slide 34 text

Operators Codify all operational tasks Manage desired state

Slide 35

Slide 35 text

Third-Party Resources Custom Resource De nitions Easily extend the Kubernetes API

Slide 36

Slide 36 text

Operate all the things aws-operator kvm-operator cert-operator flannel-operator ingress-operator

Slide 37

Slide 37 text

AWS operator Create k8s clusters on AWS based on a TPR

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

The TPRs de ne Kubernetes configuration/version Ingress configuration/version Network configuration Master/Node configurations Certificates

Slide 45

Slide 45 text

The Cert TPR de nes TTL Common Name SANs Cluster / Component

Slide 46

Slide 46 text

Overview 1. Background / Motivation 2. Architecture 3. Operators 4. Outlook

Slide 47

Slide 47 text

Micro Operators Operators should have single responsibilities. Keep them simple and maintainable

Slide 48

Slide 48 text

Operatorkit Our services are based upon microkit. We've also created operatorkit to reduce boilerplate in our operators and collect them in a library. https://github.com/giantswarm/operatorkit

Slide 49

Slide 49 text

Self-hosted First step Having Giantnetes and all guest clusters running self-hosted will further ease the lifecycle management of the clusters.

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

Thank you. Timo Derstappen CTO of Giant Swarm @teemow