Kubernetes: beyond Minikube

A presentation at SFEIR Lille Meetup in December 2019 in Lille, France by Horacio Gonzalez

Slide 1

Slide 1

SFEIR Lunch Lille - 2020-12/18 Kubernetes: Beyond Minikube Horacio Gonzalez @LostInBrittany SFEIR Lunch Lille

Slide 2

Slide 2

Who are we? Introducing myself and introducing OVH OVHcloud SFEIR Lunch Lille

Slide 3

Slide 3

Horacio Gonzalez @LostInBrittany Spaniard lost in Brittany, developer, dreamer and all-around geek Flutter SFEIR Lunch Lille

Slide 4

Slide 4

OVHcloud: A Global Leader 250k Private cloud VMs running 1 Dedicated IaaS Europe 30 Datacenters Own 20Tbps Hosting capacity : 1.3M Physical Servers 360k Servers already deployed SFEIR Lunch Lille Netwok with 35 PoPs

1.3M Customers in 138 Countries

Slide 5

Slide 5

OVHcloud: Our solutions Cloud Web Hosting Mobile Hosting Telecom VPS Containers ▪ Dedicated Server Domain names VoIP Public Cloud Compute ▪ Data Storage Email SMS/Fax Private Cloud ▪ Network and Database CDN Virtual desktop Serveur dédié Security Object Storage Web hosting Cloud HubiC Over theBox ▪ Licences Cloud Desktop Securities MS Office Hybrid Cloud Messaging MS solutions SFEIR Lunch Lille

Slide 6

Slide 6

Orchestrating containers Like herding cats… but in hard mode! SFEIR Lunch Lille

Slide 7

Slide 7

From bare metal to containers Another paradigm shift SFEIR Lunch Lille

Slide 8

Slide 8

Containers are easy… For developers SFEIR Lunch Lille

Slide 9

Slide 9

Less simple if you must operate them Like in a production context SFEIR Lunch Lille

Slide 10

Slide 10

And what about microservices? Are you sure you want to operate them by hand? SFEIR Lunch Lille

Slide 11

Slide 11

Taming microservices with Kubernetes SFEIR Lunch Lille

Slide 12

Slide 12

Kubernetes Way more than a buzzword! SFEIR Lunch Lille

Slide 13

Slide 13

Masters and nodes SFEIR Lunch Lille

Slide 14

Slide 14

Some more details SFEIR Lunch Lille

Slide 15

Slide 15

Desired State Management SFEIR Lunch Lille

Slide 16

Slide 16

Extending Kubernetes SFEIR Lunch Lille

Slide 17

Slide 17

Multi-environment made easy Dev, staging, prod, multi-cloud… SFEIR Lunch Lille

Slide 18

Slide 18

Declarative infrastructure Multi-environment made easy SFEIR Lunch Lille

Slide 19

Slide 19

Having identical, software defined envs SFEIR Lunch Lille

Slide 20

Slide 20

I have deployed on Minikube, woah! A great fastlane into Kubernetes SFEIR Lunch Lille

Slide 21

Slide 21

Running a full K8s in your laptop A great learning tool SFEIR Lunch Lille

Slide 22

Slide 22

Your laptop isn’t a true cluster Don’t expect real performances SFEIR Lunch Lille

Slide 23

Slide 23

Beyond the first deployment So I have deployed my distributed architecture on K8s, everything is good now, isn’t it? SFEIR Lunch Lille

Slide 24

Slide 24

Minikube is only the beginning SFEIR Lunch Lille

Slide 25

Slide 25

From Minikube to prod A journey not for the faint of heart SFEIR Lunch Lille

Slide 26

Slide 26

Kubernetes can be wonderful For both developers and devops SFEIR Lunch Lille

Slide 27

Slide 27

But it comes with a price… SFEIR Lunch Lille

Slide 28

Slide 28

Describing some of those traps To ease and empower your path to production SFEIR Lunch Lille

Slide 29

Slide 29

The truth is somewhere inside… SFEIR Lunch Lille

Slide 30

Slide 30

The network is going to feel it… SFEIR Lunch Lille

Slide 31

Slide 31

The storage dilemma SFEIR Lunch Lille

Slide 32

Slide 32

The ETCD vulnerability SFEIR Lunch Lille

Slide 33

Slide 33

Security Hardening your Kubernetes SFEIR Lunch Lille

Slide 34

Slide 34

The security journey SFEIR Lunch Lille

Slide 35

Slide 35

Kubernetes is insecure by design It’s a feature, not a bug. Up to K8s admin to secure it according to needs SFEIR Lunch Lille

Slide 36

Slide 36

Not everybody has the same security needs SFEIR Lunch Lille

Slide 37

Slide 37

Kubernetes allows to enforce security practices as needed SFEIR Lunch Lille

Slide 38

Slide 38

Listing some good practices SFEIR Lunch Lille

Slide 39

Slide 39

Close open access Close all by default, open only the needed ports Follow the least privileged principle SFEIR Lunch Lille

Slide 40

Slide 40

Define and implement RBAC According to your needs SFEIR Lunch Lille

Slide 41

Slide 41

Define and implement network policies SFEIR Lunch Lille

Slide 42

Slide 42

Use RBAC and Network Policies to isolate your sensitive workload SFEIR Lunch Lille

Slide 43

Slide 43

Always keep up to date Both Kubernetes and plugins SFEIR Lunch Lille

Slide 44

Slide 44

And remember, even the best can get hacked Remain attentive, don’t get too confident SFEIR Lunch Lille

Slide 45

Slide 45

Extensibility Enhance your Kubernetes SFEIR Lunch Lille

Slide 46

Slide 46

Kubernetes is modular Let’s see how some of those plugins can help you SFEIR Lunch Lille

Slide 47

Slide 47

Helm A package management for K8s SFEIR Lunch Lille

Slide 48

Slide 48

Complex deployments SFEIR Lunch Lille

Slide 49

Slide 49

Using static YAML files SFEIR Lunch Lille

Slide 50

Slide 50

Complex deployments SFEIR Lunch Lille

Slide 51

Slide 51

Istio A service mesh for Kubernetes… and much more! SFEIR Lunch Lille

Slide 52

Slide 52

Istio: A service mesh but not only SFEIR Lunch Lille

Slide 53

Slide 53

Service discovery SFEIR Lunch Lille

Slide 54

Slide 54

Traffic control SFEIR Lunch Lille

Slide 55

Slide 55

Encrypting internal communications SFEIR Lunch Lille

Slide 56

Slide 56

Routing and load balancing SFEIR Lunch Lille

Slide 57

Slide 57

Rolling upgrades SFEIR Lunch Lille

Slide 58

Slide 58

Rolling upgrades SFEIR Lunch Lille

Slide 59

Slide 59

Rolling upgrades SFEIR Lunch Lille

Slide 60

Slide 60

Rolling upgrades SFEIR Lunch Lille

Slide 61

Slide 61

Rolling upgrades SFEIR Lunch Lille

Slide 62

Slide 62

Rolling upgrades SFEIR Lunch Lille

Slide 63

Slide 63

Rolling upgrades SFEIR Lunch Lille

Slide 64

Slide 64

Rolling upgrades SFEIR Lunch Lille

Slide 65

Slide 65

Rolling upgrades SFEIR Lunch Lille

Slide 66

Slide 66

A/B testing SFEIR Lunch Lille

Slide 67

Slide 67

Monitoring your cluster SFEIR Lunch Lille

Slide 68

Slide 68

Velero Backing up your Kubernetes SFEIR Lunch Lille

Slide 69

Slide 69

Kubernetes: Desired State Management SFEIR Lunch Lille

Slide 70

Slide 70

YAML files allows to clone a cluster SFEIR Lunch Lille

Slide 71

Slide 71

But what about the data? SFEIR Lunch Lille

Slide 72

Slide 72

Velero Backup and migrate Kubernetes applications and their persistent volumes SFEIR Lunch Lille

Slide 73

Slide 73

S3 based backup On any S3 protocol compatible store SFEIR Lunch Lille

Slide 74

Slide 74

Backup all or part of a cluster SFEIR Lunch Lille

Slide 75

Slide 75

Schedule backups SFEIR Lunch Lille

Slide 76

Slide 76

Backups hooks SFEIR Lunch Lille

Slide 77

Slide 77

Conclusion And one more thing… SFEIR Lunch Lille

Slide 78

Slide 78

Kubernetes is powerful It can make Developers’ and DevOps’ lives easier SFEIR Lunch Lille

Slide 79

Slide 79

But there is a price: operating it Lot of things to think about SFEIR Lunch Lille

Slide 80

Slide 80

We have seen some of them SFEIR Lunch Lille

Slide 81

Slide 81

One more thing… Who should do what? SFEIR Lunch Lille

Slide 82

Slide 82

Different roles Each role asks for very different knowledge and skill sets SFEIR Lunch Lille

Slide 83

Slide 83

Most companies don’t need to operate the clusters As they don’t build and rack their own servers! SFEIR Lunch Lille

Slide 84

Slide 84

If you don’t need to build it, choose a certified managed solution You get the cluster, the operator get the problems SFEIR Lunch Lille

Slide 85

Slide 85

Like our OVH Managed Kubernetes Made with 💗 by the Platform team SFEIR Lunch Lille

Slide 86

Slide 86

Do you want to try? Send me an email to get some vouchers… horacio.gonzalez@corp.ovh.com SFEIR Lunch Lille

Slide 87

Slide 87

Thank you for listening SFEIR Lunch Lille