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.

K8s

273 views

Published on

Build High Quality Container Service Rapidly via Kubernetes

Published in: Technology
  • Be the first to comment

K8s

  1. 1. Kubernetes Build High Quality Container Service Rapidly via Kubernetes1
  2. 2. Who am I ? 2
  3. 3. 3
  4. 4. Why we need kubernetes? 4
  5. 5. And you need to manage them at all time….. 5
  6. 6. What is kubernetes? 6
  7. 7. Outline  Introduction  Architecture  Pod  Replication controller  Deployment  Service 7
  8. 8. What is Kubernetes  100% Open-source , written by Go  Platform for automating deployment, scaling, and operations  Inspired and informed by Google’s experiences and internal systems  The name meaning “helmsman” or “pilot”  Aka K8s, which is an abbreviation derived by replacing the 8 letters “ubernete” with 8 8
  9. 9. 9
  10. 10. 10
  11. 11. 11
  12. 12. How to install?  Portable Multi-Node Cluster  Master  Node1 12
  13. 13. Use kubeadm to install  Like docker swarm  kubeadm init, and then  And run the command to connect the master and install kubernetes 13
  14. 14. 14
  15. 15. 15
  16. 16. Pod  A Group of co-located containers(one or more)  Shared the same value and network namespace/ip port  Restart pofile  Healthy  Templates(yaml) 16
  17. 17. 17
  18. 18. 18
  19. 19. 19
  20. 20. Pod healthy  Liveness probes  When to restart a Container  ExecAction  Catch a deadlock  Restart state help to record log  InitialDelaySeconds  PeriodSeconds  Readiness Probe  Remove all request  Not sending message to this pod 20
  21. 21. The healthy of pod 21
  22. 22. label  Arbitrary metadata  The connect with Replication controller and pods  key/value pairs  identify a set of objects via a label selector 22
  23. 23. 23
  24. 24. Replication Controller  Ensures that a specified number of pod “replicas” running at any time  Flexible scale  Auto change the replica  Rolling Update 24
  25. 25. 25
  26. 26. 26
  27. 27. 27
  28. 28. 28
  29. 29. The test of replicationcontroller  The yaml file 29
  30. 30.  We create the replicationController, which pod of label is test:rc  And then we change the pod’s labels from rc to rc2  Because the replicationController get the information that no pod label is “rc”, so it create the new one 30
  31. 31.  And we delete the pod  Yes, the pod is different, that because the ReplicationController keep number is 1 of the pod which label is “rc” 31
  32. 32.  And we can also change the number of replica  Ofcourse, you can shrink the number of replica 32
  33. 33. Rolling update  Use by deployment and ReplicationController  Update period  Reverse the version(if you need) 33
  34. 34.  Now we have 4 v1(nginx1.10.5) pod  And we set rolling update our replica  Finally we update all pod to v2(nginx 1.11.5) 34
  35. 35. Deployment  K8s of latest version will recommend us use deployment replace ReplicationController  All features of ReplicationController  Check the status of a Deployment to see if it succeeds or not  Provides declarative updates for Pods and Replica Sets  Pause and resume  More powerful 35
  36. 36. Test: rolling update  set image kubectl set image deployment <deployment> <container>=<image>  Replace change the yaml file and use replace to polling update kubectl replace -f <yaml>  Edit kubectl edit deployment <deployment> 36
  37. 37. set image 37
  38. 38. Edit 38
  39. 39. Service  Defines a logical set of Pods and a policy by which to access them.  A service rule defines a TCP or UDP port reservation  Provides a way for applications running in containers to connect  Use labels 39
  40. 40. The load balance service 40
  41. 41. 41
  42. 42. Openstack Magnum  Container as a service  Conductor  Uses OpenStack Heat to deploy VM’s with kubernetes  Uses Docker API  Uses Kubernetes API (or other container orchestrator)  If you are interesting , just try it ! 42
  43. 43. THANK YOU!! Q&A 43

×