Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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.

Carter Morgan

August 04, 2016
Tweet

More Decks by Carter Morgan

Other Decks in Technology

Transcript

  1. Velocity 1.0 1.1 1.2 v1.2: - 5k commits - +50%

    unique contributors Source: http://github.com/kubernetes/kubernetes
  2. 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
  3. Community Companies Contributing Companies Using 1200+ external projects based on

    k8s 800+ unique contributors Top 0.01% of all Github projects
  4. 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
  5. 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
  6. Labels selector: version=v1 Pod nginx monolith Pod nginx monolith labels:

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

    version: v1 track: stable labels: version: v1 track: test
  8. 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
  9. Deployments Drive current state towards desired state Node 1 Pod

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

    app: hello replicas: 2 hello Node 2 Pod hello
  11. Rolling Update Node 1 Pod hello Pod hello Node Pod

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

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

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

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

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

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

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

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

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

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

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

    Node Service Pod goodbye Pod goodbye Pod goodbye
  23. Best Practices Recap The App: Use containers The Infra: Automate

    and Monitor The Infra: Avoid Lock-in The Wild: Deploy with Care