Learn more about Admission Webhooks

73e67f6da1838e3498c00f33cb0309e3?s=47 Yuichi Saito
September 28, 2018

Learn more about Admission Webhooks

73e67f6da1838e3498c00f33cb0309e3?s=128

Yuichi Saito

September 28, 2018
Tweet

Transcript

  1. ©2018 Wantedly, Inc. Learn more about 
 Admission Webhooks Kubernetes

    meetup #13 Yuichi Saito @munisystem
  2. ©2018 Wantedly, Inc.  "ENJTTJPO$POUSPMMFSͷ͓͞Β͍  "ENJTTJPO8FCIPPLTͱ͸  ·ͱΊ Agenda

  3. ©2018 Wantedly, Inc. "ENJTTJPO$POUSPMMFSͷ͓͞Β͍

  4. ©2018 Wantedly, Inc. ਎ۙʹ͋Δ"ENJTTJPO$POUSPMMFSͷྫ ଘࡏ͠ͳ͍OBNFTQBDFʹQPEΛ࡞ͬͯΈΔ

  5. ©2018 Wantedly, Inc. ਎ۙʹ͋Δ"ENJTTJPO$POUSPMMFSͷྫ ଘࡏ͠ͳ͍OBNFTQBDFʹରͯ͠QPE͸࡞Δ͜ͱ͕Ͱ͖ͳ͍

  6. ©2018 Wantedly, Inc. ਎ۙʹ͋Δ"ENJTTJPO$POUSPMMFSͷྫ ଘࡏ͠ͳ͍OBNFTQBDFʹରͯ͠QPE͸࡞Δ͜ͱ͕Ͱ͖ͳ͍ /BNFTQBDF-JGFDZDMF https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#namespacelifecycle

  7. ©2018 Wantedly, Inc. w ೝূೝՄͷ͋ͱɺ0CKFDU͕ӬଓԽ͢Δલʹ
 ΫϥΠΞϯτ͔ΒͷཁٻΛड͚ೖΕΔ͔൑ఆ͢ΔͨΊͷ࢓૊Έ w "ENJTTJPO$POUSPMMFSNVUBUJOHͱWBMJEBUJOHͷछྨ͕ଘࡏ͢Δ w NVUBUJOHΫϥΠΞϯτͷཁٻΛॻ͖׵͑Δ

    w WBMJEBUJOHΫϥΠΞϯτͷཁٻΛड͚ೖΕΔ͔Ͳ͏͔Λ൑அ͢Δ "ENJTTJPO$POUSPMMFSͱ͸
  8. ©2018 Wantedly, Inc. "ENJTTJPO$POUSPMMFSͱ͸ https://kubernetes.io/docs/reference/access-authn-authz/controlling-access/

  9. ©2018 Wantedly, Inc. w ೝূೝՄͷ͋ͱɺ0CKFDU͕ӬଓԽ͢Δલʹ
 ΫϥΠΞϯτ͔ΒͷཁٻΛΤΫηϓτ͢ΔͨΊͷ࢓૊Έ w "ENJTTJPO$POUSPMMFSNVUBUJOHͱWBMJEBUJOHͷछྨ͕ଘࡏ͢Δ w NVUBUJOHΫϥΠΞϯτͷཁٻΛॻ͖׵͑Δ

    w WBMJEBUJOHΫϥΠΞϯτͷཁٻΛड͚ೖΕΔ͔Ͳ͏͔Λ൑அ͢Δ "ENJTTJPO$POUSPMMFSͱ͸
  10. ©2018 Wantedly, Inc. ΫϥΠΞϯτͷཁٻΛॻ͖׵͑Δ͜ͱͰɺϚχϑΣετʹॻ͔ͣͱ΋ҎԼͷ͜ͱ͕ߦ͑Δ w ೚ҙͷBOOPUBUJPO΍MBCFMΛ෇༩͢Δ w ΞϓϦέʔγϣϯͷ؀ڥม਺ʹ೚ҙͷσʔλΛຒΊࠐΊΔ w QPEͷલ໘ʹQSPYZΛஔ͘

    w ΠϝʔδΛॻ͖׵͑Δ w FUD "ENJTTJPO$POUSPMMFSͱ͸
  11. ©2018 Wantedly, Inc. w ೝূೝՄͷ͋ͱɺ0CKFDU͕ӬଓԽ͢Δલʹ
 ΫϥΠΞϯτ͔ΒͷཁٻΛΤΫηϓτ͢ΔͨΊͷ࢓૊Έ w "ENJTTJPO$POUSPMMFSNVUBUJOHͱWBMJEBUJOHͷछྨ͕ଘࡏ͢Δ w NVUBUJOHΫϥΠΞϯτͷཁٻΛॻ͖׵͑Δ

    w WBMJEBUJOHΫϥΠΞϯτͷཁٻΛड͚ೖΕΔ͔Ͳ͏͔Λ൑அ͢Δ "ENJTTJPO$POUSPMMFSͱ͸
  12. ©2018 Wantedly, Inc. ΫϥΠΞϯτͷཁٻΛड͚ೖΕΔ͔Ͳ͏͔ͷ൑அΛҎԼͷ৘ใ͔Βߦ͑Δ w ϚχϑΣετͷ಺༰ w ΫϥΠΞϯτͷΞΧ΢ϯτ΍ϩʔϧͷछྨ w ֎෦αʔϏεͱͷ࿈ܞ

    w FUD "ENJTTJPO$POUSPMMFSͱ͸
  13. ©2018 Wantedly, Inc. w ೝূೝՄͷ͋ͱɺ0CKFDU͕ӬଓԽ͢Δલʹ
 ΫϥΠΞϯτ͔ΒͷཁٻΛΤΫηϓτ͢ΔͨΊͷ࢓૊Έ w "ENJTTJPO$POUSPMMFSNVUBUJOHͱWBMJEBUJOHͷछྨ͕ଘࡏ͢Δ w NVUBUJOHΫϥΠΞϯτͷཁٻΛॻ͖׵͑Δ

    w WBMJEBUJOHΫϥΠΞϯτͷཁٻΛड͚ೖΕΔ͔Ͳ͏͔Λ൑அ͢Δ "ENJTTJPO$POUSPMMFSͱ͸ ෳࡶͳΦϖϨʔγϣϯ΍ػೳΛ,VCFSOFUFT಺෦Ͱ࣮ݱͰ͖Δ
  14. ©2018 Wantedly, Inc. "ENJTTJPO8FCIPPLTͱ͸

  15. ©2018 Wantedly, Inc. w Wd͔Βαϙʔτ͞Εͨ"ENJTTJPO$POUSPMMFSΛ֦ு͢ΔͨΊͷػೳ CFUB  w BENJTTJPOQMVHJOTͰҎԼΛ༗ޮʹ͢Δ͜ͱͰར༻͕ՄೳʹͳΔ w

    .VUBUJOH"ENJTTJPO8FCIPPL w 7BMJEBUJOH"ENJTTJPO8FCIPPL w Ͳ͜Ͱ࢖ΘΕ͍ͯΔʁ w *TUJP͕TJEFDBSͱͯ͠FOWPZΛEFQMPZ͢Δ࣌ʹར༻͍ͯ͠Δ w SFGIUUQTHJUIVCDPNJTUJPJTUJPCMPCNBTUFSQJMPUQLHLVCFJOKFDUXFCIPPLHP "ENJTTJPO8FCIPPLTͱ͸
  16. ©2018 Wantedly, Inc. "ENJTTJPO8FCIPPLT0WFSWJFX https://kubernetes.io/blog/2018/01/extens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Δ͜ͱͰɺ
 ͦ͜ʹ"ENJTTJPO3FRVFTU͕ඈΜͰ͘ΔΑ͏ʹͳΔ w 7BMJEBUJOH8FCIPPL$POpHVSBUJPO0CKFDU w .VUBUJOH8FCIPPL$POpHVSBUJPO0CKFDU

    w "ENJTTJPO3FRVFTUʹର͠ฦ౴͢Δ3FTQPOTFͷܗࣜʹΑͬͯ
 "ENJTTJPO$POUSPMΛ࣮ݱ͢Δ "ENJTTJPO8FCIPPLTͱ͸
  21. ©2018 Wantedly, Inc. γϯϓϧͳ"ENJTTJPO8FCIPPLTͷྫ

  22. ©2018 Wantedly, Inc. γϯϓϧͳ"ENJTTJPO8FCIPPLTͷྫ

  23. ©2018 Wantedly, Inc. γϯϓϧͳ"ENJTTJPO8FCIPPLTͷྫ QPEͷ࡞੒͕ඞࣦͣഊ͢Δ

  24. ©2018 Wantedly, Inc. w "ENJTTJPO8FCIPPLT͸,VCFSOFUFTΛΧελϚΠζ͢Δ࢓૊Έ w ͜ΕΛ͔ͭ͏͜ͱͰ,VCFSOFUFTʹෳࡶͳΦϖϨʔγϣϯΛ࣮ݱͰ͖Δ w ΫϥΠΞϯτͷཁٻΛड͚ೖΕΔ w

    ΫϥΠΞϯτͷཁٻΛॻ͖׵͑Δ w /05ۜͷ஄ؙ w ͝ར༻͸ܭըతʹ ·ͱΊ