O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Kubernetes User Group: 維運 Kubernetes 的兩三事

724 visualizações

Publicada em

Container Orchestration 之爭已經落幕,Kubernetes 成為主流,AWS, Azure 跟 GCP 都已提出相對應的解決方案, 但該選擇廠商所提供的服務或是自己架設呢?如何把 Stateless 甚至是 Stateful 應用服務運行於其上呢?部署應用程式到 Kubernetes 之中該如何做比較好?本分享談及多次在公司導入及維運 Kubernetes 的相關經驗,讓有興趣或是剛使用的人可以減少摸索的時間

Publicada em: Software
  • Seja o primeiro a comentar

Kubernetes User Group: 維運 Kubernetes 的兩三事

  1. 1. Something About . . . Operation/Maintenance Kubernetes
  2. 2. Hello! I am Tom Tsai aka smalltown 2
  3. 3. “ 3 http://bit.ly/taipei-hug
  4. 4. “ Kubernetes Production 4
  5. 5. Outline ◂ ◂ ◂ ◂ ◂ ◂ ◂ ◂ 5
  6. 6. 1. Where is Your Kubernetes?
  7. 7. Select Where Your Kubernetes is! 7 Public Cloud No Yes Completed Network Infra. General Usage Yes Yes No Shutdown Suddenly No Yes No
  8. 8. When Should I Self-Hosted Kubernetes ◂ ◂ ◂ 8
  9. 9. 1. High Availability/Scalability
  10. 10. High Availability: Kubernetes Itself 10 - Key/Value Storage - apiserver - scheduler - controller-manager - kubelet - kube-proxy - container runtime- HA: 1, 3, 5 … - Clustering Guide - General HA Mode
  11. 11. High Availability: Application in K8S ◂ 11 ~$ kubectl get deployment NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE Nginx 3 3 3 3 18s
  12. 12. Before Talk About Scalability . . . 12
  13. 13. K8S Resource Request & Limit 13 Ref
  14. 14. Scalability: Horizontal Pod Autoscaler 14 Ref
  15. 15. Scalability: Vertical Pods Autoscaler 15 Ref
  16. 16. Scalability: Cluster Autoscaler 16 Ref
  17. 17. 1. Manage Stateful Service
  18. 18. Stateful Service ◂ ◂ ◂ ◂ ◂ ◂ 18
  19. 19. Manage Production Service 19 Stateless Stateful Setup Scale Out/Up Backup Upgrade Operation
  20. 20. CoreOS Brings K8S Operator . . . 20
  21. 21. What is Kubernetes Operator? ◂ ◂ ◂ 21
  22. 22. What is Kubernetes Operator? 22 An Operator is a Domain Specific Controller
  23. 23. Operation of Stateless Service 23 kubectl ReplicaSet app=web, env=prod Pod app=web env=prod scale up desired=3 count=1 kubectl ReplicaSet app=web, env=prod Pod app=web env=prod desired=3 count=3
  24. 24. Operation of Stateful Service (Operator) 24 backup kubectl etcd Operator app=3.0.13 size=3 Pod app=web env=prod backup-tool interval=300s
  25. 25. Exist Operators ◂ ◂ 25
  26. 26. 1. Log/Monitoring
  27. 27. Log Management . . . 27
  28. 28. Log Management: Yes, ELKF ◂ ◂ ◂ 28
  29. 29. Log Collect Centralised V.S. Decentralised ◂ ◂ ◂ 29
  30. 30. System/Application Metric Collect . . . 30
  31. 31. Metrics: Yes, Prometheus ◂ 31
  32. 32. Get Alert When Service . . . 32
  33. 33. Monitoring: Internal ◂ ◂ 33 Ref
  34. 34. Monitor: External ◂ ◂ ◂ ◂ 34
  35. 35. 1. Continuous Delivery
  36. 36. Common Resource View of K8S Application 36 Deployment YAML ConfigMap YAML Secret YAML/VaultDocker Image Tag Service YAML
  37. 37. Deploy With kubectl 37 Ref
  38. 38. The Key Man: Helm ◂ ◂ ◂ 38
  39. 39. Deploy With Helm 39 Ref
  40. 40. Good Old Days V.S. Kubernetes 40 GNU/Linux ELF Binaries Config in /etc apt, yum, etc Chef, Puppet, Ansible Kubernetes Images K8S Object Helm Operator Framework
  41. 41. CI/CD Total Solution For K8S ◂ ◂ ◂ ◂ ◂ 41
  42. 42. GitOps Patterns 42 Ref
  43. 43. 1. TroubleShooting Guide
  44. 44. Official TroubleShooting Guide ◂ ◂ ◂ ◂ 44
  45. 45. Just My Two Cents: Pod ◂ Pending ◂ Terminating ◂ CrashLoopBackOff 45
  46. 46. Just My Two Cents: Service ◂ Endpoint is Empty ◂ ◂ ◂ 46
  47. 47. Just My Two Cents: Node Register ◂ ◂ ◂ ◂ 47
  48. 48. 1. Your Best Friend: kubectl Good Craftsmanship Depends on Use of The Right Tools
  49. 49. When You Manage N Clusters N Namespaces ◂ ◂ ◂ ◂ ◂ 49
  50. 50. There Are Several Helper Tool For You ◂ ◂ ◂ ◂ 50 Ref
  51. 51. 1. Kubernetes Trends Where Kubernetes is Going?
  52. 52. Kubernetes Move So Fast... ◂ ◂ ◂ ◂ 52
  53. 53. 53 Thanks! Any questions? ◂

×