Kubernetes 101 Google IO Talk

Kubernetes 101 Google IO Talk

What is Kubernetes 101?
How do I manage application at scale? That’s a common question facing developers today and this code lab helps to make sense of the ever changing scalable app landscape. We'll use Docker and Kubernetes to deploy, scale, and manage a microservices based application in this talk.

024b34c2914d3cfa1bf93870d828c448?s=128

Carter Morgan

August 04, 2016
Tweet

Transcript

  1. Best Practices for Orchestrating the Cloud with Kubernetes Carter Morgan

    @_askcarter
  2. Photo © Annette Shaff via Canva.com #K8story

  3. monolith nginx hello nginx Microservices Monolith auth

  4. Use Containers Photo © ptnimages via Canva.com Best Practice

  5. Container Demo

  6. But that’s just one machine Discovery Scaling Security Monitoring Configuration

    Scheduling Health
  7. Automate and Monitor Photo © 3Dalia via Canva.com Best Practice

  8. Avoid Vendor Lock-in Photo © Michele Piacquadio via Canva.com Best

    Practice
  9. Kubernetes Open Source Container Automation Framework • Open API •

    Based on Google’s experiences
  10. Velocity 1.0 1.1 1.2 v1.2: - 5k commits - +50%

    unique contributors Source: http://github.com/kubernetes/kubernetes
  11. 1.2 • Deployments • DaemonSets • New UI • Simplified

    Deployments • Automated Cluster Management • Improved Scale 1.3 • Legacy application support • Cluster Federation • More nodes • In-cluster IAM • Scheduled jobs • Cluster autoscaling • Public cloud dashboard
  12. Community Companies Contributing Companies Using 1200+ external projects based on

    k8s 800+ unique contributors Top 0.01% of all Github projects
  13. Kubernetes Quick Demo

  14. Pods Logical Application • One or more containers and volumes

    • Shared namespaces • One IP per pod Pod nginx monolith NFS iSCSI GCE 10.1.0.100
  15. Labels Arbitrary metadata attached to any API object • Queryable

    by Selectors • How Kubernetes does grouping Pod nginx monolith Pod nginx monolith labels: version: v1 track: stable labels: version: v1 track: test
  16. Labels selector: version=v1 Pod nginx monolith Pod nginx monolith labels:

    version: v1 track: stable labels: version: v1 track: test
  17. Labels selector: track=stable Pod nginx monolith Pod nginx monolith labels:

    version: v1 track: stable labels: version: v1 track: test
  18. Services Persistent IPs for Pods • Uses Labels to Target

    Pods • Internal or External IPs Pod nginx monolith Pod nginx monolith Service 10.8.244.100 10.1.0.2 10.1.0.1
  19. Deployments Drive current state towards desired state Node 1 Pod

    app: hello replicas: 1 hello Node 2
  20. Deployments Drive current state towards desired state Node 1 Pod

    app: hello replicas: 2 hello Node 2 Pod hello
  21. Deployments Drive current state towards desired state Node 1 Pod

    app: hello replicas: 2 hello Node 2
  22. Deployments Drive current state towards desired state Node 1 Pod

    app: hello replicas: 2 hello Node 2 Pod hello
  23. monolith nginx hello nginx Microservices Monolith auth

  24. Kubernetes Demo

  25. What about code updates? Photo © hjalmeida via Canva.com

  26. Deploy with care Photo © Green Jo via Canva.com Best

    Practice
  27. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Pod hello Node Pod hello Service
  28. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Pod hello Node Pod hello Service Pod goodbye
  29. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Pod hello Node Pod hello Service Pod goodbye
  30. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Pod hello Node Pod hello Service Pod goodbye
  31. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Node Pod hello Service Pod goodbye Pod goodbye
  32. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Node Pod hello Service Pod goodbye Pod goodbye
  33. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Node Pod hello Service Pod goodbye Pod goodbye
  34. Rollout Node 1 Pod hello Pod hello Node Pod hello

    Node Node Service Pod goodbye Pod goodbye
  35. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Node Service Pod goodbye Pod goodbye Pod goodbye
  36. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Node Service Pod goodbye Pod goodbye Pod goodbye
  37. Rolling Update Node 1 Pod hello Pod hello Node Pod

    hello Node Node Service Pod goodbye Pod goodbye Pod goodbye
  38. Rolling Update Node 1 Pod hello Pod hello Node Node

    Node Service Pod goodbye Pod goodbye Pod goodbye
  39. Rollout Demo

  40. Best Practices Recap The App: Use containers The Infra: Automate

    and Monitor The Infra: Avoid Lock-in The Wild: Deploy with Care
  41. DevOps Engineer Nanodegree Program Scalable Microservices with Kubernetes course

  42. Scalable Microservices with Kubernetes

  43. #K8story Carter Morgan @_askcarter