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.

給 RD 的 Kubernetes 初體驗 (gcpug 2019-06 version)

1,478 views

Published on

✭✭ NOTE: a revised version of this lab is available at https://www.slideshare.net/williamyeh/rd-kubernetes-gdg-cloud-kh-201908-version ✭✭

In: GCPUG.tw Taipei Meetup (2019-06-16)
Event: https://www.meetup.com/GCPUG-Taipei/events/261797460/
Lab: https://github.com/William-Yeh/workshop-gcpug201906/

● 簡介

Kubernetes 是目前雲端環境的顯學。可是,傳統的程式,並不是原封不動搬上去,就能夠自動享受 Kubernetes 所宣稱的種種好處。

新的環境,不僅需要新的 Ops 思維,也需要新的 Dev 思維。我們將以三小時的時間,從軟體研發者的角度,探討軟體的設計該做哪些最起碼的改變,並體驗 Kubernetes 引進的新觀念及新效益。

● 目標

從實例中體驗,傳統 web 應用程式在搬上 Kubernetes 時,可能會經歷哪些架構面的調整,才能享受新架構的效益:
- 容器化
- 微服務
- 組態管理
- 多重環境管理:本機端與雲端(以 GKE 為例)
- Canary release。

● 適合對象

已經具備 Docker 基本操作能力、簡單的 Web 前後端觀念,想進一步體驗 Kubernetes 的軟體研發者。

本工作坊不會涉及太多維運層面。

Published in: Technology
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

給 RD 的 Kubernetes 初體驗 (gcpug 2019-06 version)

  1. 1. Technical Manager William Yeh 葉秉哲  給 RD 的 Kubernetes 初體驗 … with a series of hands-on labs 2019-06-16
  2. 2. • PhD in Computer Science, NCTU, Taiwan • CSPO (Certified Scrum Product Owner) from Scrum Alliance • PSM I (Professional Scrum Master I) from Scrum.org • Technical manager @ Titansoft (since Mar 2019) • Server director & Scrum master @ Gogolook • Active speaker and trainer for software architecture, DevOps, agile, and theory of constraints
  3. 3. Agenda Containers Kubernetes Cloud
  4. 4. Containers Kubernetes Cloud Agenda Labs 1.0 — 3.0 4.0 — 5.0 6.0 — 7.0
  5. 5. Agenda Know promising trends Adopt gradually Prepare mindset Goals Containers Kubernetes Cloud Labs 1.0 — 3.0 4.0 — 5.0 6.0 — 7.0
  6. 6. Lab material See the demo first!
  7. 7. Lab material For each revision, pay attention to: 1. image versions 2. diff in code and configuration Use git diff --stat HEAD~1 HEAD to see diff between revisions. Tag 1.0 2.0 3.0 4.0 4.1 5.0 6.0 7.0
  8. 8. Lab material https://github.com/William-Yeh/workshop-gcpug 201906 or http://bit.ly/gcpug201906 for short 1. Open browser 2. Git clone to your laptop
  9. 9. GKE Setup🄌 a - Redeem Google Cloud coupon b - Create project in GCP c - Create GKE cluster
  10. 10. Redeem coupon Please follow steps in your handout NOW!
  11. 11. Create Project in GCP workshop-repo / gke-steps.md or, https://console.cloud.google.com/projectsel ector2/kubernetes
  12. 12. Create GKE cluster workshop-repo / gke-steps.md
  13. 13. Containers 1.0 - Legacy 2.0 - Docker 3.0 - Frontend/backend separation ❶
  14. 14. Why containers?
  15. 15. Lab # 1.0 Legacy
  16. 16. Lab # 1.0 git checkout 1.0 git log
  17. 17. Lab # 1.0 Review a. Architecture b. Main tasks c. Diff d. Tricks e. Questions?
  18. 18. app runtime OS kernel app runtime OS kernel Boundary of application packaging: pros and cons traditional deployment way virtual machine
  19. 19. app runtime OS kernel app runtime OS kernel app runtime OS kernel IaC (Infra as Code) traditional deployment way IaC tools ● Chef ● Puppet ● Ansible virtual machine
  20. 20. app runtime OS kernel app runtime OS kernel app runtime OS kernel Containers as application packaging units traditional deployment way container virtual machine
  21. 21. Lab # 2.0 Docker
  22. 22. Lab # 2.0 git checkout 2.0 git log git diff --stat HEAD~1 HEAD
  23. 23. Lab # 2.0 Review a. Architecture b. Main tasks c. Diff d. Tricks e. Questions?
  24. 24. Lab # 3.0 Frontend/backend separation
  25. 25. Lab # 3.0 git checkout 3.0 git log git diff --stat HEAD~1 HEAD
  26. 26. app runtime OS kernel app runtime OS kernel app runtime OS kernel Recap: containers as application packaging units traditional deployment way container virtual machine
  27. 27. Lab # 3.0 Review a. Architecture b. Main tasks c. Diff d. Tricks e. Questions?
  28. 28. Kubernetes 4.0 - Local Kubernetes 4.1 - Kubernetes dashboard 5.0 - Configuration ❷
  29. 29. Lab material 4.0 - Local Kubernetes 4.1 - Kubernetes dashboard 5.0 - Configuration For each revision, pay attention to: 1. image versions 2. diff in code and configuration
  30. 30. Kubernetes Terminology “Kubernetes 101: Pods, Nodes, Containers, and Clusters” • Author: Daniel Sanche • Date: 2018-01-02 • URL: https://medium.com/google-cloud/kubernetes-101-pods-nodes-c ontainers-and-clusters-c1509e409e16 (or http://bit.ly/post-k8s-101 for short)
  31. 31. Container
  32. 32. Pod Container Any examples?
  33. 33. • Shared volumes • IPC • Network https://linchpiner.github.io/k8s-multi-container-pods.html Multi-Container Pods in Kubernetes Pod Container
  34. 34. Deployment & Replicalabel selector
  35. 35. _v2 Service label selector 3 label
  36. 36. _v2 Service container pod deployment service 3
  37. 37. Kubernetes Terminology Learn by doing!
  38. 38. Lab material 4.0 - Local Kubernetes 4.1 - Kubernetes dashboard 5.0 - Configuration For each revision, pay attention to: 1. image versions 2. diff in code and configuration
  39. 39. Lab # 4.0 Local Kubernetes
  40. 40. Lab # 4.0 git checkout 4.0 git log git diff --stat HEAD~1 HEAD
  41. 41. Lab # 4.0 Review a. Architecture b. Main tasks c. Diff d. Tricks e. Questions?
  42. 42. CAUTION ● There’s one big issue in this Lab 4.0 Can you see? ● What if a image changes but version tag remains unchanged?
  43. 43. Lab # 4.1 Kubernetes dashboard
  44. 44. Lab # 5.0 Configuration
  45. 45. Lab # 5.0 git checkout 5.0 git log git diff --stat HEAD~1 HEAD
  46. 46. _v2 Service container pod deployment service Recap: containers as application packaging units 3
  47. 47. Lab # 5.0 Review a. Architecture b. Main tasks c. Diff d. Tricks e. Questions?
  48. 48. Cloud 6.0 - Cloud (GKE for example) 7.0 - Canary release ❸
  49. 49. Lab # 6.0 Cloud (GKE for example)
  50. 50. Lab # 6.0 git checkout 6.0 git log git diff --stat HEAD~1 HEAD
  51. 51. Lab # 6.0 Review a. Architecture b. Main tasks c. Diff d. Tricks e. Questions?
  52. 52. Lab # 7.0 Canary release
  53. 53. Lab # 7.0 git checkout 7.0 git log git diff --stat HEAD~1 HEAD
  54. 54. Service label selector
  55. 55. _v2 Service label label 3 selector
  56. 56. Lab # 7.0 Review a. Architecture b. Main tasks c. Diff d. Tricks e. Questions?
  57. 57. Conclusion
  58. 58. app runtime OS kernel app runtime OS kernel app runtime OS kernel Recap: containers as application packaging units traditional deployment way container virtual machine
  59. 59. _v2 Service container pod deployment service label label 3 selector
  60. 60. Agenda Know promising trends Adopt gradually Prepare mindset Goals Containers Kubernetes Cloud Labs 1.0 — 3.0 4.0 — 5.0 6.0 — 7.0
  61. 61. Not told today Session affinity https://medium.com/@diegomrtnzg/redirect-your-users-to-the-same-pod -by-using-session-affinity-on-kubernetes-baebf6a1733b StatefulSet https://godleon.github.io/blog/Kubernetes/k8s-StatefulSets-Overview / Persistent Volume & Claim https://godleon.github.io/blog/Kubernetes/k8s-PersistentVolume-Over view/
  62. 62.

×