Slide 1

Slide 1 text

Why we use Kubernetes at my company

Slide 2

Slide 2 text

Who am I? Vincent De Smet Site Reliability Engineer @ Swatmobile co-organise Kubernetes meetups in Singapore https://www.meetup.com/Singapore-Kubernetes-User-Group vincentdesmet so0k

Slide 3

Slide 3 text

What are Containers? ● Packages up software binaries & dependencies ● Immutable & testable ● Isolate software from each other ● Portable across environments a self-contained process ref: kubernetes-comic

Slide 4

Slide 4 text

Why Containers? image: ruby:2.1 services: - postgres stages: - Build - Test - Staging - Production ... source: GitLab CI Lightweight Reproducible builds

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

More than just packing and Isolation - Scheduling: Where should the containers run? - Resource Optimisation: How much resources does each container really need? - Monitoring: What’s happening with the containers? - Lifecycle and health: Keep containers running despite failures - Auth{n,z}: Control who can do what with the containers? - Scaling: Handle higher load by adding more instances - Discovery: How can I connect to the containers? - … Source

Slide 7

Slide 7 text

ref: kubernetes-comic

Slide 8

Slide 8 text

Kubernetes how - Declarative vs Imperative: Replicas:2 vs for(i :=0; i<2;i++){ run "replica" } - Desired state + Actual State => Convergence Concept: controllers per resource type (extensible) - One time job (native) - Cron job (native) - Long running stateless process (native) - Let's Encrypt Certificate (extension) - Reverse Proxy Virtual Route (~native)

Slide 9

Slide 9 text

Kubernetes how - Discovery of endpoints Label resources + use label queries - i.e : Find all the long running processes that can service an "orders" API request → Decouple where things are through dynamic discovery (embrace failure / change)

Slide 10

Slide 10 text

Kubernetes key features - Decouple machines from workloads - Programmable workload management (extensible resource types, autoscaling, operators, ...) - Automatic recovery through health checks - Resource optimisation through resource requests / limits - Auth{z,n} strong role-based access control and team resource allocations

Slide 11

Slide 11 text

Kubernetes caveats - Embracing failure

Slide 12

Slide 12 text

Kubernetes Must read: https://k8s.af/ here?

Slide 13

Slide 13 text

Kube Nightmare

Slide 14

Slide 14 text

Kubernetes pros - Scalable application design - Reproducible environments - Decouple server operations from application operations - Ecosystem / innovative OSS projects / great Cloud Provider support

Slide 15

Slide 15 text

Lessons learned / tips - Developer buy-in is important communication, abstractions (!), insights, dev tooling - Ops job becomes a lot more flexible if you keep state out of the cluster (cluster upgrades / migrations / failure zones / … ) - App maturity (Autoscaling) If you can't autoscale (horizontally)…. Kube may not be the right option - Do you have the resources? small startup? kube may be too much of an overhead (get support from cloud provider dedicated architects & use managed solution)

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

ref: kubernetes-comic

Slide 18

Slide 18 text

origin story Star Trek?

Slide 19

Slide 19 text

1 2 3 4 5 6 7