Cloud Native Operations with Kubernetes

A presentation at Paris Container Day in June 2019 in Paris, France by Paul Czarkowski

Slide 1

Slide 1

Cloud Native Operations With Kubernetes Paul Czarkowski @pczarkowski pczarkowski@pivotal.io © Copyright 2018 Pivotal Software, Inc. All rights Reserved.

Slide 2

Slide 2

Cloud Native Operations With Kubernetes Paul Czarkowski @pczarkowski pczarkowski@pivotal.io © Copyright 2018 Pivotal Software, Inc. All rights Reserved.

Slide 3

Slide 3

Operations is the Secret sauce

Slide 4

Slide 4

Operations as a Competitive Advantage

Slide 5

Slide 5

Just not Traditional Operations.

Slide 6

Slide 6

https://go.forrester.com/blogs/ceos-and-software/

Slide 7

Slide 7

The Agile/DevOps Journey

Slide 8

Slide 8

Months BUSINESS Months DEVELOPMENT Months TEST / QA Operations

Slide 9

Slide 9

Weeks BUSINESS Months DEVELOPMENT Months TEST / QA Operations

Slide 10

Slide 10

Weeks Months Operations BUSINESS DEVELOPMENT TEST / QA

Slide 11

Slide 11

Weeks BUSINESS Months DEVELOPMENT TEST / QA Operations

Slide 12

Slide 12

Slide 13

Slide 13

Slide 14

Slide 14

Weeks BUSINESS DEVELOPMENT TEST / QA Operations

Slide 15

Slide 15

https://www.sketchplanations.com/post/175174474143/conways-law-im-paraphrasing-here-but-the-gist

Slide 16

Slide 16

Hack Conway’s Law

Slide 17

Slide 17

CHANGE

Slide 18

Slide 18

Users API Storage Admin DBA Systems Admin Network Engineer Security QA

Slide 19

Slide 19

Users API Artifacts Database Storage 1 Compute Network Access 2 Creative Commons [1] Jon Trillana [2] Simon Child

Slide 20

Slide 20

Slide 21

Slide 21

Operations as a Platform

Slide 22

Slide 22

Platform as a Product

Slide 23

Slide 23

Take business requirements and turn them into features Application Team App1 Messaging Build common services for App Teams Platform Team App Platform ML ? App2 Creds/Certs App3 Middleware ELK Container Services DBaaS Container Hosts | Kubernetes ? Infrastructure Team Abstract infrastructure complexity with easy consumption IaaS Infra Services Virtual Infrastructure Physical Infrastructure ?

Slide 24

Slide 24

Orchestration and scheduling Observability CI / CD Access Control

Slide 25

Slide 25

Slide 26

Slide 26

Slide 27

Slide 27

APP APP APP APP Production

Slide 28

Slide 28

This is Cloud Native Operations

Slide 29

Slide 29

Kubernetes

Slide 30

Slide 30

Controllers

Slide 31

Slide 31

Controllers make Kubernetes great.

Slide 32

Slide 32

Desired State Actual State

Slide 33

Slide 33

Unix Philosophy: Do one thing. Do it well.

Slide 34

Slide 34

A Kubernetes pod is fragile.

Slide 35

Slide 35

The ReplicaSet Controller Adds resiliency to your Pods.

Slide 36

Slide 36

The Deployment Controller Adds upgradability to your ReplicaSets.

Slide 37

Slide 37

You can write custom controllers very easily.

Slide 38

Slide 38

Kubernetes is an API for Operations

Slide 39

Slide 39

DNS A record please Hi, we need a DNS record for bacon.example.com To point to IP 22.33.44.55. Thanks.

Slide 40

Slide 40

external-dns controller https://github.com/kubernetes-incubator/external-dns

Slide 41

Slide 41

Slide 42

Slide 42

cert-manager controller (/operator) https://github.com/jetstack/cert-manager

Slide 43

Slide 43

Operators extend Kubernetes to support custom resources

Slide 44

Slide 44

https://github.com/operator-framework/awesome-operators

Slide 45

Slide 45

Controllers and Operators turn Kubernetes Into an API for Operations

Slide 46

Slide 46

Let’s run Kubernetes

Slide 47

Slide 47

Slide 48

Slide 48

“Let somebody else Do the hard stuff” - Me

Slide 49

Slide 49

One Big Cluster or Many Smaller Clusters One [or two] Big Cluster[s] Many Smaller Clusters ● All teams co-located on cluster, “namespaces” separate them. ● Each “team” or “business unit” gets its own cluster. ● Higher chance of noisy neighbor, other multi-tenancy issues. ● Dedicated resources to each cluster reduces noisy neighbor etc. ● Better utilization of resources (less servers, higher bin-packing) ● Resources can be customized at the cluster for the specific use cases. ● Cluster Upgrades affect everyone. ● ● Large Blast radius during cluster issues / outages. Cluster Upgrades only affect one team, easier to coordinate. ● Cluster issues/outages restricted to one team. Monolithic approach to infrastructure ● Microservices approach to Infrastructure ●

Slide 50

Slide 50

One Big Cluster or Many Smaller Clusters One [or two] Big Cluster[s] Many Smaller Clusters ● Kops ● Google Container Engine ● Pivotal Container Service - Essentials ● Pivotal Container Service - Enterprise ● OpenShift ● Elastic Container Service ● Kubespray ● Azure Container Service ● DIY chef/puppet/ansible ● Pivotal Container Service - Cloud

Slide 51

Slide 51

https://k8s.af

Slide 52

Slide 52

Start with the idea of doing many smaller clusters.

Slide 53

Slide 53

One Big Cluster or Many Smaller Clusters One [or two] Big Cluster[s] Many Smaller Clusters

Slide 54

Slide 54

APP APP APP APP Production

Slide 55

Slide 55

APP APP APP APP

Slide 56

Slide 56

APP APP APP APP

Slide 57

Slide 57

APP APP APP APP

Slide 58

Slide 58

APP APP APP APP

Slide 59

Slide 59

APP APP APP APP

Slide 60

Slide 60

APP APP APP APP

Slide 61

Slide 61

APP APP APP APP

Slide 62

Slide 62

APP APP APP APP

Slide 63

Slide 63

APP APP APP APP

Slide 64

Slide 64

A P A P P P A P A P P P A P A P P P A P A P P P A P A P P P A P A P P P A P A P P P A P A P P P

Slide 65

Slide 65

We’ve spent 10 years figuring out how to do agile operations

Slide 66

Slide 66

Slide 67

Slide 67

Platform Operations A P A P P P Kube Env #2 Repo Helm Chart Repo A P A P P P Kube Env #1 Repo A P A P P P A P A P P P

Slide 68

Slide 68

Developer Workflow App Env Repo #1 App Source Code App Env Repo #2

Slide 69

Slide 69

DEMO TIME

Slide 70

Slide 70

Transforming How The World Builds Software © Copyright 2019 Pivotal Software, Inc. All rights Reserved.