Kubernetesのカスタマイズポイントのまとめ

 Kubernetesのカスタマイズポイントのまとめ

19d1567b0b3e4762a24703e689ccfcdc?s=128

kuromatsu

March 27, 2019
Tweet

Transcript

  1. Kubernetesͷ
 ΧελϚΠζϙΠϯτͷ·ͱΊ ෋࢜௨ݚڀॴ ਓ޻஌ೳݚڀॴ @kuromt_ 1

  2. ࣗݾ঺հͱຊ೔ͷ͓࿩ • TwitterΞΧ΢ϯτ: @kuromt_ • ॴଐɿ෋࢜௨ݚڀॴɹਓ޻஌ೳݚڀॴ – ػցֶशج൫ΛKubernetes্ʹߏஙͯ͠2೥ؒۙ͘ӡ༻த • ຊ೔ͷ͓࿩

    - KubernetesΛ֦ு͢Δํ๏ͷ·ͱΊ • KubernetesΛ࢖ͬͨج൫Λߏங͢Δͱ͖ʹ஌͍ͬͯΔͱศར 2
  3. KubernetesͷجຊతͳॲཧͷྲྀΕ •Reconciliation Loop - Controller͕ϦιʔεΛ๬Ήঢ়ଶʹ͚ۙͮΔ APIServer Controller watch ๬Ή ঢ়ଶ

    Resource diff action Resource Resource ೝূ ೝՄ Admission Controller 1. ๬Ήঢ়ଶ͕ॻ͖׵Θͬͨ͜ͱΛݕ஌ 2. ๬Ήঢ়ଶͱ࣮ଶͷࠩ෼Λ֬ೝ 3. ๬Ήঢ়ଶʹ͚ۙͮΔΑ͏ʹॲཧΛ࣮ߦ ϦΫΤετ 3 Pod͕3ͭ replicas: 3
  4. Admission Controller •ೝূɺೝՄΛࡁ·ͤͨ͋ͱʹϦΫΤετΛϋϯυϧ͢Δ֦ு - APIServerىಈ࣌ʹద༻͢ΔAdmission Controller - ॲཧ಺༰Λࣗ෼Ͱ࣮૷͠ޙ͔Β௥ՃՄೳͳDynamic Admission Controller

    APIServer Controller watch ๬Ή ঢ়ଶ Resource diff action Resource Resource ೝূ ೝՄ Admission Controller ϦΫΤετ Dynamic Admission Controller 4
  5. Custom Resource Definition •APIServerʹಠࣗͷϦιʔεΛొ࿥͢Δ࢓૊Έ - ରԠ͢ΔControllerΛࣗ෼Ͱ࣮૷͢Δඞཁ͕͋Δ Custom Controller watch ๬Ή

    ঢ়ଶ Resource Resource Custom Resource diff action ϦΫΤετ ೝূ ೝՄ Admission Controller APIServer 5
  6. Aggregated APIServer •APIServerͷ໾ׂΛ࣋ͭαʔόΛผ్༻ҙ͢Δ֦ு - APIServerʹ͋ΔAggregated Layer͕ϓϩΩγͱͯ͠ৼ෣͏ - Aggregated APIServer͸ࣗ෼Ͱ༻ҙ͢Δ APIServer

    ೝূ ೝՄ ϦΫΤετ Aggregated APIServer 6
  7. ͦΕͧΕͷΧελϚΠζϙΠϯτͷ੔ཧ 7 ࣮૷ ॊೈੑ ༻్ Admission Contoller ෆཁ ࣄલʹܾΊΒΕͨϙϦγʔ ͷΈΛ࢖͏ͷͰ௿͍

    ϦΫΤετ಺༰ͷϋϯυϧ Dynamic Admission Controller ඞཁ ͋Δఔ౓੍໿͕͋Δ͕ൺֱ తࣗ༝ ϦΫΤετ಺༰ͷϋϯυϧ Custom Resource Definition ඞཁ ͋Δఔ౓੍໿͕͋Δ͕ൺֱ తࣗ༝ ಠࣗϦιʔεͷ௥Ճͱ؅ཧ Aggregated API Server ඞཁ ΄ͱΜͲ੍໿͕ͳࣗ͘༝ ্هҎ֎