Kubecon: Continuously Delivering Microservices in Kubernetes

Kubecon: Continuously Delivering Microservices in Kubernetes

A1af6e45dfb6e6cb9a64834484adf788?s=128

Sandeep Parikh

November 10, 2015
Tweet

Transcript

  1. Continuous Delivery in Kubernetes Sandeep Parikh @crcsmnky Solutions Architect Google

    Cloud Platform
  2. 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
  3. Continuous Integration Test Code Commit Push Test Build The ideal

    development flow
  4. 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
  5. Continuous Delivery Test Build Deploy Testing Staging

  6. Continuous Deployment Deploy Approve Deliver Profit

  7. Why Continuous? Fail fast I broke the build! Blame fast

    Who broke the build? Deliver faster Better software in customers hands!
  8. Tools

  9. Jenkins

  10. Kubernetes Cluster (GKE) Kubernetes Cluster Node 1 Node 3 Node

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

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

    2 Jenkins Leader Jenkins Service
  13. 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
  14. 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
  15. 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
  16. Microservices

  17. None
  18. Kubernetes Cluster (GKE) Microservices Node 2 Node 1 Backend Frontend

    Frontend Backend Service Frontend Frontend Service Backend Backend
  19. 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.
  20. 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
  21. Workflow

  22. Kubernetes Workflow Create Push Package Expose

  23. 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
  24. Workflow Repo Kubernetes Cluster (GKE) Github Jenkins µservice µservice Default

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

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

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

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

    Staging Production 1 2 3 4 Push Build Clone Stage 1 2 3 4
  29. 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
  30. 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
  31. Demo Come find me after the talk and I promise

    I’ll run it live :)
  32. Shout Out Give Evan Brown (@evanbrown) a high-five next time

    you see him. He’s super smart and got this whole thing working.
  33. 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