Slide 1

Slide 1 text

Continuous Delivery in Kubernetes Sandeep Parikh @crcsmnky Solutions Architect Google Cloud Platform

Slide 2

Slide 2 text

Why Is This Important Bulletproof process to go from code to production Centralized, repeatable building/tagging/pushing Iterate quickly and reliably Hands off my kubectl

Slide 3

Slide 3 text

Continuous Integration Test Code Commit Push Test Build The ideal development flow

Slide 4

Slide 4 text

Continuous Integration Test Code Commit Push Test Build The ideal development flow Test D’oh! Code Commit Push Test Crap! Build Whoops! The real development flow

Slide 5

Slide 5 text

Continuous Delivery Test Build Deploy Testing Staging

Slide 6

Slide 6 text

Continuous Deployment Deploy Approve Deliver Profit

Slide 7

Slide 7 text

Why Continuous? Fail fast I broke the build! Blame fast Who broke the build? Deliver faster Better software in customers hands!

Slide 8

Slide 8 text

Tools

Slide 9

Slide 9 text

Jenkins

Slide 10

Slide 10 text

Kubernetes Cluster (GKE) Kubernetes Cluster Node 1 Node 3 Node 2

Slide 11

Slide 11 text

Kubernetes Cluster (GKE) Jenkins Leader Node 1 Node 3 Node 2 Jenkins Leader

Slide 12

Slide 12 text

Kubernetes Cluster (GKE) Jenkins Service Node 1 Node 3 Node 2 Jenkins Leader Jenkins Service

Slide 13

Slide 13 text

Kubernetes Cluster (GKE) Jenkins Builder Node 1 Node 3 Node 2 Jenkins Leader Jenkins Builder Jenkins Builder Jenkins Builder Jenkins Builder Jenkins Service Jenkins Builder

Slide 14

Slide 14 text

Kubernetes Cluster (GKE) Jenkins Proxy Node 1 Node 3 Node 2 Jenkins Leader Jenkins Builder Jenkins Builder Jenkins Builder Jenkins Builder Jenkins Service Jenkins Builder nginx

Slide 15

Slide 15 text

Kubernetes Cluster (GKE) Jenkins Proxy Service Node 1 Node 3 Node 2 Jenkins Leader Jenkins Builder Jenkins Builder Jenkins Builder Jenkins Builder Jenkins Service Jenkins Builder nginx nginx Service

Slide 16

Slide 16 text

Microservices

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Kubernetes Cluster (GKE) Microservices Node 2 Node 1 Backend Frontend Frontend Backend Service Frontend Frontend Service Backend Backend

Slide 19

Slide 19 text

Microservices & Namespaces Virtual clusters backed by the same physical cluster Divide cluster resources by different use cases Supports quotas for managing resources Test, Staging, Production, etc.

Slide 20

Slide 20 text

Pods Time Microservices & Rolling Update Replace Replication Controller A with Replication Controller B by updating one Pod at a time. A B A B A B A B A B A B

Slide 21

Slide 21 text

Workflow

Slide 22

Slide 22 text

Kubernetes Workflow Create Push Package Expose

Slide 23

Slide 23 text

Mapping To Jenkins Workflow plugin, Freestyle doesn’t fit Define a flexible, extensible, script-based CD pipeline Groovy for scripting actions Supports human input/approval

Slide 24

Slide 24 text

Workflow Repo Kubernetes Cluster (GKE) Github Jenkins µservice µservice Default Staging Production

Slide 25

Slide 25 text

Workflow Repo Kubernetes Cluster (GKE) Github Jenkins µservice µservice Default Staging Production 1 Push 1

Slide 26

Slide 26 text

Workflow Repo Kubernetes Cluster (GKE) Github Jenkins µservice µservice Default Staging Production 1 2 Push Build 1 2

Slide 27

Slide 27 text

Workflow Repo Kubernetes Cluster (GKE) Github Jenkins µservice µservice Default Staging Production 1 2 3 Push Build Clone 1 2 3

Slide 28

Slide 28 text

Workflow Repo Kubernetes Cluster (GKE) Github Jenkins µservice µservice Default Staging Production 1 2 3 4 Push Build Clone Stage 1 2 3 4

Slide 29

Slide 29 text

Workflow Repo Kubernetes Cluster (GKE) Github Jenkins µservice µservice Default Staging Production 1 2 3 5 4 Push Build Clone Stage Approve 1 2 3 4 5

Slide 30

Slide 30 text

Workflow Repo Kubernetes Cluster (GKE) Github Jenkins µservice µservice Default Staging Production 1 2 3 5 4 Push Build Clone Stage Approve Deploy 1 2 3 4 5 6 6

Slide 31

Slide 31 text

Demo Come find me after the talk and I promise I’ll run it live :)

Slide 32

Slide 32 text

Shout Out Give Evan Brown (@evanbrown) a high-five next time you see him. He’s super smart and got this whole thing working.

Slide 33

Slide 33 text

Questions, Comments @crcsmnky Repo https://github.com/GoogleCloudPlatform/continuous-deployment-on-kubernetes Docs Automated Image Builds with Jenkins, Packer, and Kubernetes Distributed Load Testing using Kubernetes Real-time data analysis with Kubernetes, Google Cloud Pub/Sub, and BigQuery Real-time data analysis with Kubernetes, Redis, and BigQuery Resources