Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A Primer on Kubernetes and Google Container Engine

3,325 views

Published on

Docker and other container technologies offer the promise of improved productivity and portability. Kubernetes is one of the leading cluster management systems for Docker and powers the Google Container Engine managed service.

-A review of key Linux container concepts
-The role of Kubernetes in deploying Docker-based applications
-Primer on Google Container Service
-How RightScale works with containers and clusters

Published in: Technology

A Primer on Kubernetes and Google Container Engine

  1. 1. A PRIMER ON KUBERNETES AND GOOGLE CONTAINER ENGINE
  2. 2. Panelists • Preston Holmes • Senior Cloud Solution Architect, Google • Ryan O’Leary • Senior Product Manager
  3. 3. POLLS 2
  4. 4. Agenda • Linux container concepts • The Role of Kubernetes • Primer on Google Container Engine • How RightScale works with containers and clusters
  5. 5. PRIMER ON KUBERNETES AND GOOGLE CONTAINER ENGINE 4
  6. 6. Containers at Google A Primer on Kubernetes and Google Container Engine Preston Holmes Solution Architect @ptone
  7. 7. “Google is living a few years in the future and sending the rest of us messages” Doug Cutting - Hadoop Co-Creator
  8. 8. Late 1990’sEarly 2000’s
  9. 9. A datacenter is not a collection of computers, a datacenter is a computer.
  10. 10. VMs vs. Containers Physical Processor Virtual Processor Operating System Libraries User Code Private Copy Shared Virtual Machines Physical Processor Virtual Processor Operating System Libraries User Code Containers ISA syscall Containers: less overhead, enable more “magic”
  11. 11. Google has been developing and using containers to manage our applications for over 10 years. Images by Connie Zhou
  12. 12. 2004 2006 2013 2014 Limited isolation Released CGroups Released LMCTFY Kubernetes Google and containers Containers Google and container technology
  13. 13. Containers at Google Developed as only practical way to manage Google-scale compute Everything at Google runs in a container
  14. 14. Containers at Google Developed as only practical way to manage Google-scale compute Everything at Google runs in a container We launch over 2 Billion containers per week.
  15. 15. What is Docker? • An implementation of the container idea • A package format • Resource isolation (via libcontainer) • An ecosystem • A company Hoorah! The world is starting to adopt containers!
  16. 16. Containers need management
  17. 17. More than just packing and isolation Scheduling: Where should my containers run? Lifecycle and health: Keep my containers running despite failures Discovery: Where are my containers now? Monitoring: What’s happening with my containers? Auth{n,z}: Control who can do things to my containers Aggregates: Compose sets of containers into jobs Scaling: Making jobs bigger or smaller
  18. 18. •Kubernetes
  19. 19. •Kubernetes (brought to you by the team that brought you Borg)
  20. 20. •Kubernetes (brought to you by the team that brought you Borg) (and hundreds more contributors)
  21. 21. Kubernetes is Owned By Everyone Open-source container orchestration Broad industry support Supports multi-cloud, on-prem VM, bare metal Kubernetes
  22. 22. Kubernetes is Owned By Everyone Open-source container orchestration Broad industry support Supports multi-cloud, on-prem VM, bare metal Kubernetes
  23. 23. An Amazing Community ● Fastest growing orchestrator ○ around 200 pull requests per week ... ○ from 400+ contributors ● Most all design discussion happens in open on IRC channel •Kubernetes is a universal deployment target
  24. 24. Real World Adoption ● Use Kubernetes to simplify shipping software: ● Use Kubernetes in high scale environments - ● Extend Kubernetes to new powerful scenarios - Samsung
  25. 25. Kubernetes Architecture etcd API Server Scheduler Controller Manager Kubelet Service Proxy kubectl, ajax, etc
  26. 26. users master nodes A 50000 foot view CLI apiserver kubelet kubelet kubelet scheduler
  27. 27. A 50000 foot view apiserver kubelet kubelet kubelet scheduler Run X Replicas = 2 Memory = 4Gi CPU = 2.5
  28. 28. A 50000 foot view apiserver kubelet kubelet kubelet scheduler Which nodes for X ?
  29. 29. A 50000 foot view apiserver kubelet kubelet kubelet scheduler
  30. 30. A 50000 foot view apiserver kubelet kubelet kubelet scheduler Registry pull X pull X
  31. 31. A 50000 foot view apiserver kubelet kubelet kubelet scheduler X X
  32. 32. A 50000 foot view apiserver kubelet kubelet kubelet scheduler X X GET X
  33. 33. A 50000 foot view apiserver kubelet kubelet kubelet scheduler X X Status X
  34. 34. All you really care about Run X Master Container Cluster X X Status X
  35. 35. Primary concepts Container: A sealed application package (Docker) Pod: A small group of tightly coupled Containers Labels: Identifying metadata attached to objects Selector: A query against labels, producing a set result Controller: A reconciliation loop that drives current state towards desired state Service: A set of pods that work together
  36. 36. Kubernetes Concepts: Pods Container Foo Namespaces - Net - IPC - .. Container Bar
  37. 37. Kubernetes Concepts: Pods Container Foo Container Bar Namespaces - Net - IPC - .. Networking
  38. 38. Kubernetes Concepts: Pods Container Foo Container Bar Namespaces - Net - IPC - .. Volumes
  39. 39. Container Foo Container Bar Namespaces - Net - IPC - .. Kubernetes Concepts: Pods Labels
  40. 40. Nginx Git Syncher Pod Example
  41. 41. Node.JS Git Syncher Pod Example
  42. 42. WebApp Twemproxy Pod Example localhost
  43. 43. Search Index Shard Loader Pod Example Shared Memory
  44. 44. Kubernetes Concepts: Labels frontend production production backend production backend QA testing
  45. 45. Kubernetes Concepts: Labels frontend production production backend production backend QA testing stage: production
  46. 46. Kubernetes Concepts: Labels frontend production production backend production backend QA testing stage: production role: backend
  47. 47. Reconciliation
  48. 48. Reconciliation pods: - foo - bar pods: - foo Create
  49. 49. Reconciliation pods: - foo - bar pods: - foocreate “bar” Create
  50. 50. Reconciliation pods: - foo - bar pods: - foo Health Check
  51. 51. Reconciliation pods: - foo pods: - foo - bar Delete
  52. 52. Reconciliation pods: - foo pods: - foo - bar Delete delete “bar”
  53. 53. Kubernetes Concepts: Replication Controller production backend production backendproduction backend #N
  54. 54. Kubernetes Concepts: Services production backend production backend production backend port(s ) name 1.2.3.4 “name”
  55. 55. Google Container Engine - Inspired by a decade within Google - Re-imagines Cluster computing - Designed for a multi-cloud world Photo by Connie Zhou
  56. 56. Run and manage an optimized cluster Kubernetes Open Source Workload API & Tools Google Container Engine (GKE) Google Container Engine Kubernetes ● Growing Community ● Linux containers support ● Open source orchestration • Container Engine ● Provisioned cluster in seconds ● Optimized cluster environment ● Runs and manages Kubernetes create and manage GKE Master GKE Nodes Compute Engine VMs
  57. 57. Questions? http://kubernetes.io/ #google-containers google-containers@googlegroups.com github.com/GoogleCloudPlatform/kubernetes cloud.google.com/container-engine
  58. 58. RightScale and Containers Self-Service Cloud Analytics RightScale Cloud Portfolio Management Cloud Management Design Virtualized Environments Public Clouds Other Services Private Clouds Automate Multi-Cloud Orchestration & Governance OperateDeploy Report Optimize 57 Container Cluster Bare Metal
  59. 59. Automating Cluster Deployments 58 Master Nodes Pod A Pod B DNS Configure a cluster: Cloud Application Template (CAT) Deployment on any cloud/virtual End-user configurable Managed by IT Configure components: • Master • Nodes • Pods • Containers • External services (DNS, etc)
  60. 60. Q&A Google/Kubernetes http://kubernetes.io/ #google-containers google-containers@googlegroups.com github.com/GoogleCloudPlatform/kubernetes cloud.google.com/container-engine RightScale Webinar on how RightScale does Docker in Production http://www.rightscale.com/docker-webinar
  61. 61. THANK YOU.

×