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

GitOpsでJobの
実行と管理どうしてます?

Aa97a6ad2c4c8422f5580f4f9d5b5744?s=47 dulltz
December 22, 2020

 GitOpsでJobの
実行と管理どうしてます?

Kubernetes Meetup Tokyo #37 の LT 資料です

https://k8sjp.connpass.com/event/197875/

Aa97a6ad2c4c8422f5580f4f9d5b5744?s=128

dulltz

December 22, 2020
Tweet

Transcript

  1. (JU0QTͰ+PCͷ ࣮ߦͱ؅ཧͲ͏ͯ͠·͢ʁ 5BLBIJSP5TVSVEB!EVMMU[

  2. ࿩͢͜ͱ w +PCͷ(JU0QT؅ཧʹ͓͚ΔࠔͬͨϙΠϯτͱɺղܾҊΛ঺հ w جૅతͳτϐοΫա͗ͯ-5͢Δͷ΋एׯጨΒΕΔ͕ɺҙ֎ͱ୭ ΋͜ͷ࿩Λ͍ͯ͠ͳ͍ؾ͕͢Δ w Ή͠Ζօ͞ΜͲ͏ͯ͠·͢ʁڭ͑ͯԼ͍͞

  3. +PC w ϫϯγϣοτܕͷϫʔΫϩʔυΛىಈ͢ΔͨΊͷϦιʔε w ࢦఆ਺ͷ1PEΛىಈ͠ɺͦΕΒ͕ਖ਼ৗऴྃͨ͠ΒDPNQMFUF w IUUQTLVCFSOFUFTJPEPDTDPODFQUTXPSLMPBETDPOUSPMMFST KPC

  4. (JU0QT w ܧଓతσϦόϦͷ̍ͭͷ΍Γํ w (JUϦϙδτϦΛ୯Ұιʔεͱ͠ɺͦͷϦϙδτϦ΁ͷૢ࡞Λհ ͯ͠ద༻ΦϖϨʔγϣϯΛߦ͏

  5. ,VCFSOFUFTΫϥελ্ͷ(JU0QT w "SHP$%ɺ'MVYͷΑ͏ͳ1VMMܕ(JU0QTπʔϧ͕ਓؾ SFGIUUQTXXXXFBWFXPSLTUFDIOPMPHJFTHJUPQT

  6. 1VMMܕ(JU0QTπʔϧͷ࢖༻Πϝʔδ  ϚχϑΣετ:".-Λ࡞੒  LVTUPNJ[BUJPOZBNMͷSFTPVSDFTʹϑΝΠϧ໊Λ௥ه  13Λ࡞੒  13ΛϚʔδͯ͠σϓϩΠ༻ϒϥϯνΛߋ৽ 

    ϚχϑΣετϦϙδτϦ্ͷLVTUPNJ[BUJPOZBNMΛ؂ࢹͯ͠ ͍Δ(JU0QTπʔϧ͕LVCFDUMBQQMZ͢Δ
  7. (JU0QTͱ+PCͷ૬ੑͷѱ͞

  8. (JU0QTͱ+PCͷ૬ੑͷѱ͞  w +PCͷ1PE5FNQMBUF͸JNNVUBCMFͳͷͰɺߋ৽࣌ͷLVCFDUM BQQMZ͸͍͍ࣦͨͯഊ͢Δɻ w TQFDUFNQMBUF*OWBMJEWBMVFGJFMEJTJNNVUBCMF

  9. (JU0QTͱ+PCͷ૬ੑͷѱ͞  w +PCϚχϑΣετ͕มߋ͞Ε͔ͨΒͱ͍ͬͯ+PCΛىಈ͍ͨ͠ͱ ͸ݶΒͳ͍

  10. ղܾҊ

  11. ҊLVCFDUMBQQMZʹŠGPSDFΦϓγϣϯΛ෇ ͚Δ w +PCΛߋ৽͢Δ୅ΘΓʹ࠶࡞੒͢Δ͜ͱͰରԠ ҎԼͷ৚݅Λຬͨ͢ඞཁ͕͋Δ w ŠGPSDFΦϓγϣϯΛαϙʔτ͍ͯ͠ΔπʔϧΛ࢖͍ͬͯΔ "SHP$%౳ w +PC͕ႈ౳Ͱ͋Δ

    w ແବͳ+PCىಈʹΑΔϦιʔεফඅΛڐ༰Ͱ͖Δ
  12. ҊΧελϜίϯτϩʔϥಋೖ w 5FLUPO "SHP8PSLGMPXTͳͲ

  13. ҊΧελϜίϯτϩʔϥಋೖ 1SPT w LVCFDUMBQQMZͰߋ৽Մೳ $POT w αʔυύʔςΟ੡ΧελϜίϯτϩʔϥͷ؅ཧίετ

  14. Ҋ(JU0QTπʔϧͰ؅ཧ͠ͳ͍ w (JUϦϙδτϦͰϚχϑΣετΛ؅ཧ͢Δ͕ɺ"SHP$%'MVYͰ LVCFDUMBQQMZ͢Δର৅ʹ͸ؚΊͳ͍ɻ ىಈ͍ͨ͠ͱ͖͸खಈʢ͋Δ͍͸$*ʣͰLVCFDUMBQQMZ࣮ߦ

  15. Ҋ(JU0QTπʔϧͰ؅ཧ͠ͳ͍ 1SPT w $3%ෆཁ w $POT w LVTUPNJ[BUJPOZBNMʹهࡌ͍ͯ͠ͳ͍ϚχϑΣετ͕͋Δͷ͸ͳΜͱ ͳ͘ҧ࿨ײʜɻ ALVTUPNJ[FCVJMEcDPOGUFTUUFTUrAͱ͔ͰϚχϑΣετϦϙδτϦͷ

    ςετ͠·͢ΑͶ
  16. Ҋఀࢭͨ͠$SPO+PC͔Β+PCΛదٓ࡞੒ w ͜ΕͰ΍ͬͯ·͢ w ఀࢭͨ͠$SPO+PCΛ(JU0QTͰ؅ཧ͢Δ w spec: suspend: true concurrencyPolicy:

    Forbid w +PCΛىಈ͍ͨ͠ͱ͖͸ALVCFDUMDSFBUFKPCKPCOBNF GSPNDSPOKPCDSPOKPCOBNFA
  17. Ҋఀࢭͨ͠$SPO+PC͔Β+PCΛదٓ࡞੒ w 1SPT w $3%ෆཁ w ҊͷσϝϦοτ͕ແ͍ w $POT w

    (JUϦϙδτϦ͕୯ҰιʔεͰ͋Δͱ͍͏ϧʔϧʹଇΔͳΒɺ(JUϦϙδ τϦ͔ΒLVCFDUMΛ࣮ߦ͢ΔͨΊͷ$*ͷ࡞ΓࠐΈ͕ඞཁ w +PCΛ($͢Δίϯτϩʔϥ͕͍ͳ͍ w +PCͷUFNQMBUFͷ࣮ߦ্࣌ॻ͖͕ͮ͠Β͍
  18. +PCΛ($͢Δํ๏ w +PC࡞੒௚લʹݹ͍+PCΛ࡟আ͢Δ ݪ࢝తͳҊ  w TQFDUUM4FDPOET"GUFS'JOJTIFEΛηοτ͢Δ w 55-$POUSPMMFS͸"MQIBػೳɻ&,4Ͱ͸·ͩ࢖͑ͳ͍ɻ w

    IUUQTLVCFSOFUFTJPEPDTDPODFQUTXPSLMPBETDPOUSPMMFST UUMBGUFSGJOJTIFE w ˢͷ୅ସπʔϧ w IUUQTHJUIVCDPNMXPMGLVCFDMFBOVQPQFSBUPS
  19. ·ͱΊ w +PCͷ(JU0QT؅ཧͱͯ͠ɺࠓ͸ఀࢭͨ͠$SPO+PC͔Β+PCΛ࡞ͬ ͍ͯ·͢ w ͔͜͠͠Ε͕ϕετͩͱ͸ࢥͬͯͳ͍ w ͍͍ΞΠσΞ͕͋ͬͨΒڭ͑ͯԼ͍͞