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

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

kuromatsu
March 27, 2019

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

kuromatsu

March 27, 2019
Tweet

More Decks by kuromatsu

Other Decks in Technology

Transcript

  1. Kubernetesͷ

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

    View full-size slide

  2. ࣗݾ঺հͱຊ೔ͷ͓࿩
    • TwitterΞΧ΢ϯτ: @kuromt_
    • ॴଐɿ෋࢜௨ݚڀॴɹਓ޻஌ೳݚڀॴ
    – ػցֶशج൫ΛKubernetes্ʹߏஙͯ͠2೥ؒۙ͘ӡ༻த
    • ຊ೔ͷ͓࿩
    - KubernetesΛ֦ு͢Δํ๏ͷ·ͱΊ
    • KubernetesΛ࢖ͬͨج൫Λߏங͢Δͱ͖ʹ஌͍ͬͯΔͱศར
    2

    View full-size slide

  3. KubernetesͷجຊతͳॲཧͷྲྀΕ
    ●Reconciliation Loop
    - Controller͕ϦιʔεΛ๬Ήঢ়ଶʹ͚ۙͮΔ
    APIServer
    Controller
    watch
    ๬Ή
    ঢ়ଶ
    Resource
    diff
    action
    Resource
    Resource
    ೝূ ೝՄ Admission
    Controller
    1. ๬Ήঢ়ଶ͕ॻ͖׵Θͬͨ͜ͱΛݕ஌
    2. ๬Ήঢ়ଶͱ࣮ଶͷࠩ෼Λ֬ೝ
    3. ๬Ήঢ়ଶʹ͚ۙͮΔΑ͏ʹॲཧΛ࣮ߦ
    ϦΫΤετ
    3
    Pod͕3ͭ
    replicas: 3

    View full-size slide

  4. Admission Controller
    ●ೝূɺೝՄΛࡁ·ͤͨ͋ͱʹϦΫΤετΛϋϯυϧ͢Δ֦ு
    - APIServerىಈ࣌ʹద༻͢ΔAdmission Controller
    - ॲཧ಺༰Λࣗ෼Ͱ࣮૷͠ޙ͔Β௥ՃՄೳͳDynamic Admission Controller
    APIServer
    Controller
    watch
    ๬Ή
    ঢ়ଶ
    Resource
    diff
    action
    Resource
    Resource
    ೝূ ೝՄ
    Admission
    Controller
    ϦΫΤετ
    Dynamic
    Admission
    Controller
    4

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  7. ͦΕͧΕͷΧελϚΠζϙΠϯτͷ੔ཧ
    7
    ࣮૷ ॊೈੑ ༻్
    Admission Contoller
    ෆཁ
    ࣄલʹܾΊΒΕͨϙϦγʔ
    ͷΈΛ࢖͏ͷͰ௿͍
    ϦΫΤετ಺༰ͷϋϯυϧ
    Dynamic Admission
    Controller ඞཁ
    ͋Δఔ౓੍໿͕͋Δ͕ൺֱ
    తࣗ༝
    ϦΫΤετ಺༰ͷϋϯυϧ
    Custom Resource
    Definition ඞཁ
    ͋Δఔ౓੍໿͕͋Δ͕ൺֱ
    తࣗ༝
    ಠࣗϦιʔεͷ௥Ճͱ؅ཧ
    Aggregated API
    Server ඞཁ ΄ͱΜͲ੍໿͕ͳࣗ͘༝ ্هҎ֎

    View full-size slide