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

K3sマスターへの道

 K3sマスターへの道

K3sマスターシリーズの第一編
K3sの基本紹介とデモンストレーション

Wenhan Shi

July 30, 2020
Tweet

More Decks by Wenhan Shi

Other Decks in Technology

Transcript

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

    © Copyright 2020 Rancher Labs. All Rights Reserved. 1 ,TϚελʔͷಓ ͸͡Ίͯͷ঺հ 30th July 2020 8FOIBO4IJ 4VQQPSU&OHJOFFS
  2. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 2

    Agenda 初めての紹介 ユースケース 基本紹介 Demo
  3. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 3

    ,VCFSOFUFTܰྔԽͷඞཁੑ • ,VCFSOFUFTͷػೳ͕૿Ճ͢ΔҰํɺϢʔβ͕Ұ෦ͷΈΛར༻ • ྫ͑͹ɺΦϯϓϨ؀ڥͰ͸ɺ1VCMJD$MPVE 1SPWJEFS͕͍Βͳ͍ Public Cloud Private Cloud 1$ Edge
  4. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 4

    マイクロのKubernetes ,T  $/$'$FSUJGJDBUFE,VCFSOFUFTEJTUSJCVUJPO  .#͙Β͍ͷόΠφϦ  42-JUF EFGBVMU 1PTUHSF42-.Z42-%RMJUFFUDE  9@ "SN "SNW  3FRVJSFNFOU  3"..#<>  $16 DPSF [1] ユーザWorkloadがない時の最小消費リソース。
  5. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 5

    ,Tͷಛ௃  γϯάϧϓϩηεͰ؆୯σϓϩΠ  ,VCFSOFUFT.BTUFS ,VCFMFU DPOUBJOFSE  ඞਢͰ͸ͳ͍ίʔυΛ࡟আ͠ɺϦιʔεΛઅ໿  5-4 $FSUJGJDBUJPO؅ཧ  $POUBJOFSE಺ଂ  SPPUGT಺ଂ  )FMN$IBSU಺ଂ  --ϨΠϠͷ-#ػೳ಺ଂ  ʜ
  6. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 9

    ,TόʔδϣϯͷϑΥʔϚοτ vX.YY.Z+k3sX ϕʔεͱͳΔ6QTUSFBOͷ ,Tͷόʔδϣϯ ࠨଆͷόʔδϣϯରԠͷ ,Tͷ൪߸
  7. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 12

    IUUQTSBODIFSDPNEPDTLTMBUFTUFOJOTUBMMBUJPOIB ΞʔΩςΫνϟʔ Ϛϧναʔόʔϊʔυ
  8. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 13

    ,TϑΝϛϦʔ • LD $MBTTJD%PDLFSGPSB,VCFSOFUFTXPSME • LE  LTJO%PDLFS • LPT 1VSQPTFCVJMU04GPS,VCFSOFUFT GVMMZNBOBHFECZ,VCFSOFUFT
  9. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 14

    • )PNFQBHFIUUQTLTJP • (JUIVCɿ IUUQTHJUIVCDPNSBODIFSLTJTTVFT • 4MBDLɿIUUQTTMBDLSBODIFSJP • LTDIBOOFM ίϛϡχςΟ
  10. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 15

    Agenda 初めての紹介 ユースケース 基本紹介 Demo
  11. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 16

    Demo • γϯάϧϊʔυͰͷσϓϩΠ • $POUBJOFS 3VOUJNFͷࢦఆ • ,Tόʔδϣϯͷࢦఆ • 8PSLFSϊʔυͷ௥Ճ • ,TΫϥελͷ6QHSBEF • ,TΫϥελͷ6OJOTUBMM curl -sfL https://get.k3s.io | sh - curl -sfL https://get.k3s.io | sh -s - --docker curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.17.9+k3s1 sh - https://github.com/rancher/k3s/releases /var/lib/rancher/k3s/server/node-token curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh - ## offline install https://rancher.com/docs/k3s/latest/en/installation/airgap/
  12. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 17

    Agenda 初めての紹介 ユースケース 基本紹介 Demo
  13. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 18

    $MPVE FEHF ,T api-server scheduler controller-manager kubelet Pod Pod kubelet Pod Pod kubelet Pod Pod api-server scheduler controller-manager kubelet kubelet api-server scheduler controller-manager kubelet kubelet
  14. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 19

    l4PGUXBSF3VOUJNFz ,T • Kubernetesネイティブのアプリケーションが増加 • K8sクラスタより、k3s上で実行 • Easy to quickstart • Out of the box • Easy deploy and maintain • reduce resources “Most of these applications that we are building now would not have been possible without the cloud native patterns and the flexibility that Kubernetes enables.” Brad Linder Cloud Native & Big Data Evangelist
  15. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 20

    %FW0QT ,T • CI環境 • Managed k3s service • IaaSと組み合わせ、軽量なKaaSサービスを提供 • 軽量のため、リソースはユーザーのWorkloadにフォーカス • 各K3sクラスタが独立だから、故障時の影響を最小限に • ユーザのニーズに合わせてカスタマイズ可能 • e.g. https://www.civo.com/kube100
  16. © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 21

    21 Embedded dqlite Architecture – HA with Embedded DB 1 Edge Use Case (Manufacturing) 1 © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 30 30
  17. © Copyright 2019 Rancher Labs. All Rights Reserved. Confidential 22

    © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 22 https://github.com/rancher/fleet '-&&5 § ʙඦສڃͷ਺ͷ,VCFSOFUFTΫϥελΛ؅ཧ͢ΔγεςϜ
  18. © Copyright 2019 Rancher Labs. All Rights Reserved. Confidential 23

    © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 23 '-&&5ͷಛ௃ § ୯ಠͷ,VCFSOFUFT 1FU ΑΓɺશମͷ,VCFSOFUFT؋ୂ $BUUMF Λҙࣝ § $MVTUFS(SPVQTͰෳ਺ͷ,VCFSOFUFTΛ؅ཧ § %FQMPZͷ୯Ґ͸#VOEMFʢ:".-)FMN,VTUPNJ[Fʣ#VOEMFͷྫ • selectorsでCluster Group内のKubernetes Clusterが対象 • アプリだけではなく、クラスタの設定も変更可能 • 全Clusterにデプロイしたアプリの状態を監視し、一致性を保証 § (JUϕʔεͷϫʔΫϑϩʔͱ૊Έ߹ΘͤՄೳ
  19. © Copyright 2019 Rancher Labs. All Rights Reserved. Confidential 24

    © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 24 © Copyright 2020 Rancher Labs. All Rights Reserved. Confidential 36 Dev teams can leverage K3s to develop their applications The Rancher Management Server manages all downstream Kubernetes nodes. No cost K3s Nodes are the downstream Kubernetes compute nodes at the edge. Rancher Setup – Clustered Nodes Single node design assumes acceptable downtime when required w/all benefits of Kubernetes at the edge Rancher Management Server in HA – Prod/UAT Node Node Node All-in-one nodes (cp/etcd/worker) Node Backup Node Node Backup Node Node Backup Node Node Backup Node Node Backup Node Node Backup Node