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

軽量Kubernetesディストリビューションである"K3s"を支える拡張機能

3218b28de1401d518a2fdfa198bec1b5?s=47 cheng
September 02, 2020

 軽量Kubernetesディストリビューションである"K3s"を支える拡張機能

Helm CLIのインストールが不要で、Helm CRDのみでアプリのライフサイクルを管理する「Helm Controller」を中心に紹介します。

3218b28de1401d518a2fdfa198bec1b5?s=128

cheng

September 02, 2020
Tweet

Transcript

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

    Copyright 2020 Rancher Labs. All Rights Reserved. 1 ܰྔK8sσΟετϦϏϡʔγϣϯͰ͋Δ "K3s"Λࢧ͑Δ֦ுػೳ 2020/09/02 Cheng
  2. About me Jianqiang Cheng(νΣϯ) Field Engineer at Rancher Labs. cheng@rancher.com

    cheng@slack.rancher.jp ▪Favorite technologies: Rancher, Kubernetes, AWS, Jenkins. ▪Certifications:
  3. © Copyright 2020 Rancher Labs. All Rights Reserved. 3 K3sͱ͸?

  4. © Copyright 2020 Rancher Labs. All Rights Reserved. 4 ΞʔΩςΫνϟ

  5. © Copyright 2020 Rancher Labs. All Rights Reserved. 5 Helm

    Controller Helm CLIͷΠϯετʔϧ͕ෆཁͰɺ Helm CRDͷΈͰΞϓϦͷϥΠϑα ΠΫϧΛ؅ཧ Service LB ΤοδଆͳͲɺCloud Provider͕ͳ ͍؀ڥͰ΋ɺLBλΠϓͷserviceΛ࡞ ੒Ͱ͖Δػೳ Traefik LB ܰྔͳIngress ControllerΛఏڙ local path provisioner ϩΧʔϧ؀ڥͰstorageClassͷ provisionerΛఏڙ K3sͷ֦ுػೳͷ֓ཁ
  6. © Copyright 2020 Rancher Labs. All Rights Reserved. 6 Helm

    Controller • Helm͸K8sͷύοέʔδϚωʔδϟʔ • k3s Helm Controller͸ɺHelmͷv2ͱv3ͷ྆ํΛαϙʔτ • v1.17.0+k3s1Ҏ্ͷόʔδϣϯ͸ɺv3Λαϙʔτ։࢝ • Helm Controllerͷಛ௃ • ϢʔβʔମݧΛ޲্ • K3sͷػೳ֦ு͕؆୯ʹ https://helm.sh/docs/faq/#changes-since-helm-2
  7. © Copyright 2020 Rancher Labs. All Rights Reserved. 7 Helm

    Controller࢓૊Έ Library: https://github.com/rancher/helm-controller https://github.com/rancher/klipper-helm 1. Helm-controller͸master nodeʹ࣮ߦ͞Ε、HelmChart CRDΛlist/watch 2. CRD͕onChange࣌ʹɺΞϓϦߋ৽༻ͷJobΛ࣮ߦ 3. Jobʹ͸ɺrancher/kilipper-helmΛίϯςφͰ࣮ߦ 4. Killper-helm͸ɺ಺ଂͷhelm cliͰChatΛΠϯετʔϧΞοϓσʔτ
  8. © Copyright 2020 Rancher Labs. All Rights Reserved. 8 HelmChart

    CRDͷσϓϩΠํࣜ • 「/var/lib/rancher/k3s/server/manifestsʯʹೖ͍ͬͯΔ HelmChart͕ࣗಈʹσϓϩΠ͞ΕΔ • Kubectl applyʹΑΔHelmChart CRDͷΠϯετʔϧ • CRDܦ༝ͰσϓϩΠͨ͠ΞϓϦ͸ɺhelm CLI͔Β΋ૢ ࡞Ͱ͖Δ
  9. © Copyright 2020 Rancher Labs. All Rights Reserved. 9 Demo

    • ,T্ʹɺHelmChart CRDͰఆٛͨ͠ΞϓϦͷσϓϩΠ • ্هͰσϓϩΠͨ͠ΞϓϦΛɺhelm cliͰ؅ཧ
  10. © Copyright 2020 Rancher Labs. All Rights Reserved. 10 Helm

    Controller ·ͱΊ • Ϣʔβʔମݧͷ޲্ • HelmChart CRDにより、機能拡張が簡単になる CI/CD integration, etc • Helm CLIと互換性がある • 利用しているOSSは下記である • rancher/helm-controller • rancher/kilipper-helm
  11. © Copyright 2020 Rancher Labs. All Rights Reserved. 11

  12. © Copyright 2020 Rancher Labs. All Rights Reserved. 12 12

    ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ