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.

Kubernetes in 20 minutes - HDE Monthly Technical Session 24

Kubernetes Concepts and Terms explained at a very high level

  • Login to see the comments

Kubernetes in 20 minutes - HDE Monthly Technical Session 24

  1. 1. Kubernetes in 20 minutes HDE Monthly Technical Session July 22, 2016 Daisuke Maki @lestrrat
  2. 2. Netscape Navigator
  3. 3. Netscape Navigator
  4. 4. Kubernetes
  5. 5. κυβερνήτης
  6. 6. k8s
  7. 7. “Something to do with containers…?
  8. 8. •You know about containers •You know about orchestration •You know about the painful art of deploying stuff Assumptions
  9. 9. Docker
  10. 10. “Random containers doing their own sh*t”
  11. 11. Compose
  12. 12. “Foreman on Acid”
  13. 13. Swarm
  14. 14. “Clustering and Discovery” (hey, we’re getting somewhere!)
  15. 15. =
  16. 16. “Batteries Included”
  17. 17. K8s on GCP GKE GCE Networking …and others
  18. 18. Basic Concepts
  19. 19. Node
  20. 20. Hosts running k8s daemons
  21. 21. Node kubelet Node kubelet Node kubelet Master Scheduler etc.. API
  22. 22. Pod
  23. 23. Basic unit of deployment in k8s
  24. 24. Group of Containers
  25. 25. Container configurations
  26. 26. Shared storage
  27. 27. Pod container
  28. 28. Pod container container
  29. 29. Pod container container container
  30. 30. Pod container container container nginx app redis/cache e.g.
  31. 31. Scheduled together (“co-scheduled”)
  32. 32. Guaranteed to be on the same node (“co-located”)
  33. 33. Node NodeNode
  34. 34. Node NodeNode Depends on each node’s resource availability and each pod’s resource requirements
  35. 35. Node Node container container container
  36. 36. Node Node container container container This will NEVER happen
  37. 37. Miscellaneous • Each pod has its own IP address • Pods are expected to be stateless
  38. 38. Replica Set
  39. 39. Keeps track of Pod replicas
  40. 40. Replica Set replicas: 3
 template:
  41. 41. Replica Set replicas: 3
 template: A
  42. 42. Replica Set replicas: 3
 template: A B
  43. 43. Replica Set replicas: 3
 template: CA B
  44. 44. Replica Set replicas: 3
 template: CA B
  45. 45. Replica Set replicas: 3
 template: A B
  46. 46. Replica Set replicas: 3
 template: A B D
  47. 47. Deployment
  48. 48. Manages Replica Set state transitions
  49. 49. Deployment replicas: 3
 template:
  50. 50. Deployment replicas: 3
 template: Replica Set A replicas: 3
 template:
  51. 51. Deployment replicas: 3
 template: Replica Set A replicas: 3
 template: Change some settings, please!
  52. 52. Deployment replicas: 3
 template: Replica Set A replicas: 3
 template: 2 Change some settings, please!
  53. 53. Deployment replicas: 3
 template: Replica Set A replicas: 3
 template: Replica Set B replicas: 2
 template: 2 Change some settings, please!
  54. 54. Deployment replicas: 3
 template: Replica Set A replicas: 3
 template: Replica Set B replicas: 2
 template: 2 Change some settings, please!
  55. 55. Deployment replicas: 3
 template: Replica Set B replicas: 2
 template: 2 Change some settings, please!
  56. 56. Keeps track of state change history
  57. 57. Deployment replicas: 3
 template:
  58. 58. Deployment replicas: 3
 template: A replicas: 3
 template:
  59. 59. Deployment replicas: 3
 template: A replicas: 3
 template: Change some settings, please!
  60. 60. Deployment replicas: 3
 template: A replicas: 3
 template: 2 Change some settings, please!
  61. 61. Deployment replicas: 3
 template: A replicas: 3
 template: B replicas: 2
 template: 2 Change some settings, please!
  62. 62. Deployment replicas: 3
 template: A replicas: 3
 template: B replicas: 2
 template: 2 Change some settings, please!
  63. 63. Deployment replicas: 3
 template: B replicas: 2
 template: 2 Change some settings, please!
  64. 64. Deployment replicas: 3
 template: B replicas: 2
 template: 2 Oh wait, I actually didn’t want to do that…
  65. 65. Deployment replicas: 3
 template: B replicas: 2
 template: 2 Oh wait, I actually didn’t want to do that… 3
  66. 66. Deployment replicas: 3
 template: B replicas: 2
 template: 2 Oh wait, I actually didn’t want to do that… rollback 3
  67. 67. Deployment replicas: 3
 template: B replicas: 2
 template: 2 Oh wait, I actually didn’t want to do that… rollback A replicas: 3
 template: 3
  68. 68. Deployment replicas: 3
 template: B replicas: 2
 template: 2 Oh wait, I actually didn’t want to do that… rollback A replicas: 3
 template: 3
  69. 69. Deployment replicas: 3
 template: 2 Oh wait, I actually didn’t want to do that… A replicas: 3
 template: 3
  70. 70. Services
  71. 71. Logical set of Pods (and ways to access them)
  72. 72. Pod 10.0.96.2 Pod 10.0.96.3 Pod 10.0.96.3 Raw Pod Access
  73. 73. Pod 10.0.96.2 Pod 10.0.96.3 Pod 10.0.96.3 Raw Pod Access
  74. 74. Pod 10.0.96.2 Pod 10.0.96.3 Pod 10.0.96.3 Raw Pod Access
  75. 75. Pod 10.0.96.2 Pod 10.0.96.3 Raw Pod Access
  76. 76. Pod 10.0.96.2 Pod 10.0.96.3 Raw Pod Access
  77. 77. Pod 10.0.96.3 role=web Access Via Service Pod 10.0.96.4 role=web Service match role=web Pod 10.0.96.2 role=web Pod 10.0.96.5 role=db
  78. 78. Pod 10.0.96.3 role=web Access Via Service Pod 10.0.96.4 role=web Service match role=web Pod 10.0.96.2 role=web Pod 10.0.96.5 role=db
  79. 79. Pod 10.0.96.3 role=web Access Via Service Pod 10.0.96.4 role=web Service match role=web Pod 10.0.96.2 role=web Pod 10.0.96.5 role=db
  80. 80. Pod 10.0.96.3 role=web Access Via Service Pod 10.0.96.4 role=web Service match role=web Pod 10.0.96.2 role=web Pod 10.0.96.5 role=db
  81. 81. Access Via Service Pod 10.0.96.4 role=web Service match role=web Pod 10.0.96.2 role=web Pod 10.0.96.5 role=db
  82. 82. Access Via Service Pod 10.0.96.4 role=web Service match role=web Pod 10.0.96.2 role=web Pod 10.0.96.5 role=db
  83. 83. Access Via Service Pod 10.0.96.6 role=web Pod 10.0.96.4 role=web Service match role=web Pod 10.0.96.2 role=web Pod 10.0.96.5 role=db
  84. 84. Access Via Service Pod 10.0.96.6 role=web Pod 10.0.96.4 role=web Service match role=web Pod 10.0.96.2 role=web Pod 10.0.96.5 role=db
  85. 85. Secrets
  86. 86. Store pieces of data in k8s
  87. 87. e.g. Identity Information
  88. 88. (securely)
  89. 89. (…in the future)
  90. 90. Secret key1 → base64 value key3 → base64 value key2 → base64 value
  91. 91. Pod container volumes container:
 volumeMounts: - name: certificates mountPath: /etc/ssl/certs volumes: - name: certificates secret: secretName: ca-certificates
  92. 92. ConfigMaps
  93. 93. Same as Secrets (Unprotected)
  94. 94. Ingress
  95. 95. Services are for within the cluster only
  96. 96. (New since 1.2) Inbound connections to internal cluster services
  97. 97. Please checkout my presentation https://docs.google.com/presentation/d/ 11ZN6qgiuZZfVyhBK2hjp1vhp_5N0DOGnAmhPreS3L5A/pub? start=false&loop=false&delayms=3000
  98. 98. DaemonSets
  99. 99. Ensure nodes run a copy of a Pod Node prometheus-exporter prometheus-exporter prometheus-exporter Node Node
  100. 100. PetSets
  101. 101. snip.
  102. 102. Questions?
  103. 103. Appendix: ECS vs GKE https://railsadventures.wordpress.com/2015/12/06/why-we- chose-kubernetes-over-ecs/
  104. 104. If you want to play with k8s, I’m doing this entirely on GCP/GKE… Come Join https://slack-invite-dot-builderscon-1248.appspot.com/

×