Kubernetes for DevOps… and Java Devs

A presentation at Montpellier JUG & DevOps Montpellier in December 2019 in Montpellier, France by Horacio Gonzalez

Slide 1

Slide 1

Montpellier - 2020-12-18 Kubernetes for DevOps… and Devs Horacio Gonzalez @LostInBrittany Montpellier Tech Hub

Slide 2

Slide 2

Who are we? Introducing myself and introducing OVH OVHcloud Montpellier Tech Hub

Slide 3

Slide 3

Horacio Gonzalez @LostInBrittany Spaniard lost in Brittany, developer, dreamer and all-around geek Flutter Montpellier Tech Hub

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 Montpellier Tech Hub 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 Montpellier Tech Hub

Slide 6

Slide 6

Orchestrating containers Like herding cats… but in hard mode! Montpellier Tech Hub

Slide 7

Slide 7

From bare metal to containers Another paradigm shift Montpellier Tech Hub

Slide 8

Slide 8

Containers are easy… For developers Montpellier Tech Hub

Slide 9

Slide 9

Less simple if you must operate them Like in a production context Montpellier Tech Hub

Slide 10

Slide 10

And what about microservices? Are you sure you want to operate them by hand? Montpellier Tech Hub

Slide 11

Slide 11

Taming microservices with Kubernetes Montpellier Tech Hub

Slide 12

Slide 12

Kubernetes Way more than a buzzword! Montpellier Tech Hub

Slide 13

Slide 13

Masters and nodes Montpellier Tech Hub

Slide 14

Slide 14

Some more details Montpellier Tech Hub

Slide 15

Slide 15

Desired State Management Montpellier Tech Hub

Slide 16

Slide 16

Extending Kubernetes Montpellier Tech Hub

Slide 17

Slide 17

Multi-environment made easy Dev, staging, prod, multi-cloud… Montpellier Tech Hub

Slide 18

Slide 18

Declarative infrastructure Multi-environment made easy Montpellier Tech Hub

Slide 19

Slide 19

Having identical, software defined envs Montpellier Tech Hub

Slide 20

Slide 20

I have deployed on Minikube, woah! A great fastlane into Kubernetes Montpellier Tech Hub

Slide 21

Slide 21

Running a full K8s in your laptop A great learning tool Montpellier Tech Hub

Slide 22

Slide 22

Your laptop isn’t a true cluster Don’t expect real performances Montpellier Tech Hub

Slide 23

Slide 23

Beyond the first deployment So I have deployed my distributed architecture on K8s, everything is good now, isn’t it? Montpellier Tech Hub

Slide 24

Slide 24

Minikube is only the beginning Montpellier Tech Hub

Slide 25

Slide 25

From Minikube to prod A journey not for the faint of heart Montpellier Tech Hub

Slide 26

Slide 26

Kubernetes can be wonderful For both developers and devops Montpellier Tech Hub

Slide 27

Slide 27

But it comes with a price… Montpellier Tech Hub

Slide 28

Slide 28

Describing some of those traps To ease and empower your path to production Montpellier Tech Hub

Slide 29

Slide 29

The truth is somewhere inside… Montpellier Tech Hub

Slide 30

Slide 30

The network is going to feel it… Montpellier Tech Hub

Slide 31

Slide 31

The storage dilemma Montpellier Tech Hub

Slide 32

Slide 32

The ETCD vulnerability Montpellier Tech Hub

Slide 33

Slide 33

Security Hardening your Kubernetes Montpellier Tech Hub

Slide 34

Slide 34

The security journey Montpellier Tech Hub

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 Montpellier Tech Hub

Slide 36

Slide 36

Not everybody has the same security needs Montpellier Tech Hub

Slide 37

Slide 37

Kubernetes allows to enforce security practices as needed Montpellier Tech Hub

Slide 38

Slide 38

Listing some good practices Montpellier Tech Hub

Slide 39

Slide 39

Close open access Close all by default, open only the needed ports Follow the least privileged principle Montpellier Tech Hub

Slide 40

Slide 40

Define and implement RBAC According to your needs Montpellier Tech Hub

Slide 41

Slide 41

Define and implement network policies Montpellier Tech Hub

Slide 42

Slide 42

Use RBAC and Network Policies to isolate your sensitive workload Montpellier Tech Hub

Slide 43

Slide 43

Always keep up to date Both Kubernetes and plugins Montpellier Tech Hub

Slide 44

Slide 44

And remember, even the best can get hacked Remain attentive, don’t get too confident Montpellier Tech Hub

Slide 45

Slide 45

Extensibility Enhance your Kubernetes Montpellier Tech Hub

Slide 46

Slide 46

Kubernetes is modular Let’s see how some of those plugins can help you Montpellier Tech Hub

Slide 47

Slide 47

Helm A package management for K8s Montpellier Tech Hub

Slide 48

Slide 48

Complex deployments Montpellier Tech Hub

Slide 49

Slide 49

Using static YAML files Montpellier Tech Hub

Slide 50

Slide 50

Complex deployments Montpellier Tech Hub

Slide 51

Slide 51

Istio A service mesh for Kubernetes… and much more! Montpellier Tech Hub

Slide 52

Slide 52

Istio: A service mesh but not only Montpellier Tech Hub

Slide 53

Slide 53

Service discovery Montpellier Tech Hub

Slide 54

Slide 54

Traffic control Montpellier Tech Hub

Slide 55

Slide 55

Encrypting internal communications Montpellier Tech Hub

Slide 56

Slide 56

Routing and load balancing Montpellier Tech Hub

Slide 57

Slide 57

Rolling upgrades Montpellier Tech Hub

Slide 58

Slide 58

Rolling upgrades Montpellier Tech Hub

Slide 59

Slide 59

Rolling upgrades Montpellier Tech Hub

Slide 60

Slide 60

Rolling upgrades Montpellier Tech Hub

Slide 61

Slide 61

Rolling upgrades Montpellier Tech Hub

Slide 62

Slide 62

Rolling upgrades Montpellier Tech Hub

Slide 63

Slide 63

Rolling upgrades Montpellier Tech Hub

Slide 64

Slide 64

Rolling upgrades Montpellier Tech Hub

Slide 65

Slide 65

Rolling upgrades Montpellier Tech Hub

Slide 66

Slide 66

A/B testing Montpellier Tech Hub

Slide 67

Slide 67

Monitoring your cluster Montpellier Tech Hub

Slide 68

Slide 68

Velero Backing up your Kubernetes Montpellier Tech Hub

Slide 69

Slide 69

Kubernetes: Desired State Management Montpellier Tech Hub

Slide 70

Slide 70

YAML files allows to clone a cluster Montpellier Tech Hub

Slide 71

Slide 71

But what about the data? Montpellier Tech Hub

Slide 72

Slide 72

Velero Backup and migrate Kubernetes applications and their persistent volumes Montpellier Tech Hub

Slide 73

Slide 73

S3 based backup On any S3 protocol compatible store Montpellier Tech Hub

Slide 74

Slide 74

Backup all or part of a cluster Montpellier Tech Hub

Slide 75

Slide 75

Schedule backups Montpellier Tech Hub

Slide 76

Slide 76

Backups hooks Montpellier Tech Hub

Slide 77

Slide 77

Conclusion And one more thing… Montpellier Tech Hub

Slide 78

Slide 78

Kubernetes is powerful It can make Developers’ and DevOps’ lives easier Montpellier Tech Hub

Slide 79

Slide 79

But there is a price: operating it Lot of things to think about Montpellier Tech Hub

Slide 80

Slide 80

We have seen some of them Montpellier Tech Hub

Slide 81

Slide 81

One more thing… Who should do what? Montpellier Tech Hub

Slide 82

Slide 82

Different roles Each role asks for very different knowledge and skill sets Montpellier Tech Hub

Slide 83

Slide 83

Most companies don’t need to operate the clusters As they don’t build and rack their own servers! Montpellier Tech Hub

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 Montpellier Tech Hub

Slide 85

Slide 85

Like our OVH Managed Kubernetes Made with 💗 by the Platform team Montpellier Tech Hub

Slide 86

Slide 86

Do you want to try? Send me an email to get some vouchers… horacio.gonzalez@corp.ovh.com Montpellier Tech Hub

Slide 87

Slide 87

Thank you for listening Montpellier Tech Hub

Slide 88

Slide 88

Montpellier - 2020-12-18 GraalVM & Quarkus Horacio Gonzalez @LostInBrittany Montpellier Tech Hub

Slide 89

Slide 89

GraalVM An alternative JVM with a twist Montpellier Tech Hub

Slide 90

Slide 90

What’s GraalVM? A standalone Java Development Kit to execute: ● JVM-based languages ● Dynamic languages ● LLVM-based languages Montpellier Tech Hub

Slide 91

Slide 91

What’s GraalVM? Montpellier Tech Hub

Slide 92

Slide 92

What’s GraalVM? Montpellier Tech Hub

Slide 93

Slide 93

GraalVM Features GraalVM lets you: ● Run your code faster and more efficiently ● Interoperate directly with most modern programming languages ● Embed languages with the GraalVM SDK ● Create compiled native images ● Use a single set of tools to monitor, debug, and profile all your code Montpellier Tech Hub

Slide 94

Slide 94

GraalVM base package The base installation includes: ● The JVM ● The GraalVM compiler ● The LLVM bitcode interpreter ● The JavaScript runtime Montpellier Tech Hub

Slide 95

Slide 95

Why GraalVM? For Java programs: ● Run Java faster ● Make Your Application Extensible ● Create a Native Image Montpellier Tech Hub

Slide 96

Slide 96

Why GraalVM? For JavaScript programs: ● Reuse Libraries from Java, R, or Python ● Run with Large Heaps ● Define Data Structures in C/C++ Montpellier Tech Hub

Slide 97

Slide 97

Why GraalVM? GraalVM native images reduce: ● Runtime memory footprint ● Startup time Montpellier Tech Hub

Slide 98

Slide 98

And how does it compile ? Dead code elimination Closed world assumption Montpellier Tech Hub

Slide 99

Slide 99

Adding some limitations… Montpellier Tech Hub

Slide 100

Slide 100

Quarkus Supersonic Subatomic Java Montpellier Tech Hub

Slide 101

Slide 101

What’s Quarkus? ● A Kubernetes Native Java stack ● Tailored for OpenJDK HotSpot and GraalVM ● Crafted from the best of breed Java libraries and standards Montpellier Tech Hub

Slide 102

Slide 102

Container first Montpellier Tech Hub

Slide 103

Slide 103

Unifies imperative and reactive Combine imperative code and the non-blocking reactive style Montpellier Tech Hub

Slide 104

Slide 104

By developers, for developers ● Unified configuration ● Zero config, live reload in the blink of an eye ● Streamlined code for the 80% common usages, flexible for the 20% ● No hassle native executable generation Montpellier Tech Hub

Slide 105

Slide 105

Leveraging the ecosystem Over fifty best-of-breed libraries wired on a standard backbone Montpellier Tech Hub

Slide 106

Slide 106

Thank you for listening Montpellier Tech Hub