Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rancher Virtual Rodeo Japan 2020/07「入門編」

cheng
July 02, 2020

Rancher Virtual Rodeo Japan 2020/07「入門編」

Rancher Virtual Rodeosは、DevOpsおよびITチームがKubernetesをどこにでもデプロイして管理するために、必要かつ実践的なスキルを提供するように設計された無料のオンラインワークショップです。コンテナおよびKubernetesの使用方法について興味がある方に向けたこのワークショップはRancherのテクニカルエキスパートによって実施されます。テクニカルエキスパートがRancher、Docker、Kubernetesをご紹介、Kubernetesクラスタをデプロイするための手順をご説明します。

今回はRancher Virtual Rodeo Japan「入門編」を実施します。コンテナ、KubernetesのメリットからRodeoのご紹介をメインにハンズオンも行います。今後は実践編なども企画しますので、このワークショップへのご理解を深めていただく内容とします。

Rancher Virtual Rodeoが実施する主要なトピックには次のものが含まれます。
DockerおよびKubernetesおさらい
Lab環境(HobbyFarm)説明
RKEによるクラスター構築
Rancher Server構築
Rancherによるクラスター構築
hello-worldアプリケーションをクラスターにデプロイ
WordPressをクラスターにデプロイ

cheng

July 02, 2020
Tweet

More Decks by cheng

Other Decks in Technology

Transcript

  1. © Copyright 2019 Rancher Labs. All Rights Reserved. Confidential 1

    © Copyright 2020 Rancher Labs. All Rights Reserved. 1 Rancher Rodeo Online Workshop Cheng Rancher Labs
  2. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 2

    Objectives for the day l Docker͓ΑͼKubernetes͓͞Β͍ l Lab؀ڥ HobbyFarm આ໌ l RKEʹΑΔΫϥελʔߏங l Rancher Serverߏங l RancherʹΑΔΫϥελʔߏங l hello-worldΞϓϦέʔγϣϯΛΫϥελʔʹσϓϩΠ l WordPressΛΫϥελʔʹσϓϩΠ
  3. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 3

    Forewarning l ͜ͷRodeo͸ɺKubernetesͱRancherͷॳ৺ऀ޲͚ʹઃܭ͞Ε͍ͯ·͢ l ͜͜ʹ঺հ͞Ε͍ͯΔ಺༰͸ɺඞͣ͠΋ຊ൪؀ڥͰͷӡ༻ํ๏Ͱ͸͋Γ·ͤ Μ͕ɺຊ൪؀ڥ޲͚ͷجૅ஌ࣝͱߟ͍͖͍͑ͯͨͩͨͰ͢
  4. © Copyright 2020 Rancher Labs. All Rights Reserved. 5 Container

    Image Application Code Application Dependencies Container Image
  5. © Copyright 2020 Rancher Labs. All Rights Reserved. 6 Container

    Image Container Image Container Container Container
  6. © Copyright 2020 Rancher Labs. All Rights Reserved. 8 Containers

    l ΠϝʔδΛݩʹ࡞੒͞ΕΔԾ૝؀ڥͷ࣮ߦ෦෼ʢinstanceʣ l ϙʔλϏϦςΟr ΞϓϦέʔγϣϯΛ̍ճϏϧυ͢Ε͹ɺͲ͜Ͱ΋ಉ࣮͘͡ߦͰ͖Δ l ΞϓϦέʔγϣϯΛɺܰྔͳִ཭͞Εͨ؀ڥʹ࣮ߦͰ͖Δ l ΞϓϦέʔγϣϯͷΠϯελϯεΛਫฏํ޲ʹ؆୯ʹεέʔϦϯάͰ͖Δ
  7. © Copyright 2020 Rancher Labs. All Rights Reserved. 9 Containers

    Source : https://www.docker.com/resources/what-container
  8. © Copyright 2020 Rancher Labs. All Rights Reserved. 12 Registries

    l ΠϝʔδΛ֨ೲ͢ΔͨΊͷ৔ॴ l Public l Private l On-prem / Cloud l ੡඼ྫ l Amazon Elastic Container Registry l Azure Container Registry l Docker Hub l Ұ෦ͷ੡඼͸ػೳ֦ு΋͍ͯ͠Δ l Vulnerability scanning l LDAP / AD Support l Auditing l Replication l etc
  9. © Copyright 2020 Rancher Labs. All Rights Reserved. 13 Containers

    are great……..but Managing a couple – no problem
  10. © Copyright 2020 Rancher Labs. All Rights Reserved. 14 Containers

    are great……..but How about managing many? How do we address: Networking, Security, Scheduling, Automation, etc?
  11. © Copyright 2020 Rancher Labs. All Rights Reserved. 16 Kubernetes

    l Kubernetes͸ɺίϯςφԽ͞ΕͨϫʔΫϩʔυ΍αʔϏεΛ؅ཧ͢ΔͨΊͷɺ ϙʔλϒϧͰ֦ுੑͷ͋ΔΦʔϓϯιʔεϓϥοτϗʔϜͰ͢ l Kubernetes͸ɺYAMLܗࣜ΍JSONܗࣜͰهड़ͨ͠એݴతͳίʔυʢظ଴ͳঢ় ଶʣʹΑͬͯɺσϓϩΠ͢Δίϯςφ΍पลϦιʔεΛ؅ཧ͠·͢
  12. © Copyright 2020 Rancher Labs. All Rights Reserved. 17 Kubernetes

    Architecture l ControlplaneΫϥε λʔ؅ཧػೳɺ"1*Πϯ λϑΣʔεΛఏڙ l Etcd: ΩʔόϦϡʔετ ΞͰɺKubernetesͷશͯ ͷΫϥελʔ৘ใͷอଘ ৔ॴ l Worker: ίϯςφʢϫʔ Ϋϩʔυʣ͕࣮ࡍʹσϓ ϩΠ͞ΕΔϚγϯ API / CLI
  13. © Copyright 2020 Rancher Labs. All Rights Reserved. 18 Kubernetes

    Resources - Pod l ϫʔΫϩʔυͷ࠷খ୯Ґ l αʔόʔԾ૝Խʹ͓͍ͯɺhypervisor্ͷ1ͭͷ VM૬౰ͷײ͡ l 1ͭҎ্ͷίϯςφΛؚΉ l ԼهϦιʔε΋ؚΉ: l Storage (ie shared volumes) l Networking l 1ͭͷϊʔυׂ͕Γ౰ͯΒΕ͍ͯΔ
  14. © Copyright 2020 Rancher Labs. All Rights Reserved. 19 Kubernetes

    Resources - Deployment l ෳ਺ͷಉ͡ Pod Λ؅ཧ͢ΔͨΊͷϦιʔε l ෳ਺ͷಉ͡ 1PEΛάϧʔϓͰ؅ཧ l Updating l Scaling l Rollback l ݱࡏͷঢ়ଶΛࢦఆ͞Εͨঢ়ଶ΁มߋ
  15. © Copyright 2020 Rancher Labs. All Rights Reserved. 21 Kubernetes

    Resources - Service l Pod͸ඞͣ͠΋Ӭଓੑ͕ߴ͍΋ͷͰ͸ͳ͍ l Podʹ௚઀ΞΫηε͠ͳ͍Ͱʂ l Podsͷू߹Ͱ࣮ߦ͞Ε͍ͯΔΞϓϦέʔγϣϯΛ ωοτϫʔΫαʔϏεͱͯ͠ެ։͢Δந৅తͳํ๏ l Podͷηοτʹର͢Δ୯ҰͷIP/DNS໊Λఏڙ l Services͸಺෦ΞΫηε޲͚(ClusterIP)ͱ ֎෦ΞΫη ε޲͚(NodePort & Loadbalancer)ͷ2छྨ
  16. © Copyright 2020 Rancher Labs. All Rights Reserved. 22 Kubernetes

    Resources - Service 10.42.0.4 10.42.0.5 10.42.0.6 Endpoints: 10.42.0.4 10.42.0.5 10.42.0.6 Type : LoadBalancer 10.42.0.7 Endpoints: 10.42.0.4 10.42.0.5 10.42.0.7
  17. © Copyright 2020 Rancher Labs. All Rights Reserved. 23 Kubernetes

    Resources - Ingress l Ϋϥελʔ಺ͷServiceʹର͢Δ֎෦͔ΒͷΞΫηεΛ ؅ཧ l ओʹHTTP l Serviceʹରͯ͠ɺ֎෦͔ΒΞΫηεͳՄೳURLΛఏڙ l ෛՙ෼ࢄ(Load Balance traffic) ͷػೳΛఏڙ l SSLऴ୺(Terminate) ͷػೳΛఏڙ l ໊લϕʔεͷԾ૝ϗεςΟϯάͷػೳΛఏڙ
  18. © Copyright 2020 Rancher Labs. All Rights Reserved. 24 Kubernetes

    Resources - Ingress Kubernetes Cluster /bar /foo ServiceA ServiceB foo.bar.com/bar foo.bar.com/foo
  19. © Copyright 2020 Rancher Labs. All Rights Reserved. 25 Kubernetes

    KubernetesΤίγεςϜ͕ɺ๲େͳ΋ͷͰ͢ - https://landscape.cncf.io (These are just the Storage projects)
  20. © Copyright 2020 Rancher Labs. All Rights Reserved. 26 RancherがKubernetesにもたらすもの

    26 Network & Storage Registry App Catalog Monitoring Kubernetes Container Runtime CI/CD Service Mesh Logging Security RBAC & PSP Authentication What Rancher takes an SLA on Manage all this? … or this? Rancher Certified Integrations Cloud Datacenter Dev Branch Edge Google GKE Azure AKS Amazon EKS
  21. © Copyright 2020 Rancher Labs. All Rights Reserved. 27 Lab環境(HobbyFarm)説明

    l https://learn.eu1.hobbyfarm.io/login ΁ΞΫηε l [e-mail] ɺ [Access Code]ɺٴͼ[password] ͰϢʔβʔΛొ࿥ l Access Code:
  22. © Copyright 2020 Rancher Labs. All Rights Reserved. 31 31

    What is RKE RKE͸ɺΫϥ΢υɺΦϯϓϨϛεɺٴͼϩʔΧϧ؀ڥʹkubernetesΫϥελ Λ؆୯ʹσϓϩΠͰ͖ΔCLIπʔϧͰ͢ɻ
  23. © Copyright 2020 Rancher Labs. All Rights Reserved. 32 32

    What is RKE ಛ௃ • ର৅ϊʔυʹ44)઀ଓͯ͠ϓϩϏδϣχϯάΛ࣮ࢪ • LVCFSOFUFTͷ֤छίϯϙʔωϯτ FUDE΍BQJTFSWFSͳ Ͳ Λίϯςφͱͯ͠ىಈ • )"ͳΫϥελΛߏஙՄೳ
  24. © Copyright 2020 Rancher Labs. All Rights Reserved. 33 33

    What is RKE ࢖͍ํ • ࣄલʹΫϥελʔ༻ͷϊʔυΛ༻ҙ • SLFఆٛϑΝΠϧΛ࡞੒ • SLF VQ࣮ߦͰΫϥελʔߏங
  25. © Copyright 2019 Rancher Labs. All Rights Reserved. Confidential 35

    © Copyright 2020 Rancher Labs. All Rights Reserved. 35 Intermission