基礎から分かる!アプリケーション開発者のためのKubernetes入門 / kubernetes-basics-for-application-developers

5dbaf4015e7f249ab21b195ced8e9e46?s=47 Masatoshi Tada
September 08, 2020

基礎から分かる!アプリケーション開発者のためのKubernetes入門 / kubernetes-basics-for-application-developers

CloudNative Days Tokyo 2020で発表した資料です。

5dbaf4015e7f249ab21b195ced8e9e46?s=128

Masatoshi Tada

September 08, 2020
Tweet

Transcript

  1. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D جૅ͔Β෼͔Δʂ ΞϓϦέʔγϣϯ։ൃऀ ͷͨΊͷ ,VCFSOFUFTೖ໳ ג

    ΧαϨΞϧଟాਅහ ೥݄೔ $MPVE/BUJWF%BZT5PLZP 
  2. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ͜ͷηογϣϯͷ໨త ▸ ΞϓϦέʔγϣϯ։ൃऀ໨ઢͰ஌͓ͬͯ͘΂͖ ,VCFSOFUFTͷ஌ࣝͱ࢓૊ΈΛͬ͘͟Γ௫Ή ▸

    %PDLFSͳͲίϯςφͷ஌ࣝ΍ɺ ,VCFSOFUFTࣗମͷ؅ཧɾӡ༻ͳͲ͸είʔϓ֎ ▸ αϯϓϧίʔυ ▸ IUUQTHJUIVCDPN.BTBUPTIJ5BEBLT KKVHDDDTQSJOH 
  3. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ࣗݾ঺հ ▸ ଟాਅහʢ!TVLF@NBTBʣ ▸ ݚमτϨʔφʔ!ΧαϨΞϧ

    ▸ +BWB(PMBOH.JDSPTFSWJDFT ,VCFSOFUFT ▸ 1JWPUBMʢݱ7.XBSFʣೝఆߨࢣ ▸ ೔ຊ4QSJOHϢʔβձελοϑ  LPOUFTUͷղઆΛ ॻ͖·ͨ͠ʂ
  4. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ࣗݾ঺հʢଓ͖ʣ ▸ ೥݄ɺ$,"%औಘ ▸ $MPVE/BUJWF$PNQVUJOH'PVOEBUJPO

    $/$'  ʹΑΔ,VCFSOFUFTͷ։ൃऀ޲͚ࢿ֨ 
  5. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D גࣜձࣾΧαϨΞϧ ▸ ଞࣾʹ͸ແ͍৭ʑͳϓϩάϥϛϯάݴޠͷ ݚमΛఏڙ͍ͯ͠·͢ʂ 

    /&8
  6. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ΦϯϥΠϯݚमɺ͸͡Ί·ͨ͠  ߨࢣ डߨऀ༷ ▸

    ʮֶशޮՌ͸௨ৗͱมΘΒͳ͍ʯ ͱ޷ධͰ͢ʂ
  7. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTݚम  ΞϓϦέʔγϣϯΤϯδχΞͷͨΊͷ ,VCFSOFUFTجૅ Ϋϥ΢υωΠςΟϒͳΞϓϦέʔγϣϯͷߏஙͱӡ༻

    ೔ؒ ▸ ຊ೔ͷ಺༰͸ݚमͷҰ෦ΛਂງΓͨ͠΋ͷͰ͢ ▸ ݚम಺Ͱ͸ɺຊ೔͸ѻΘͳ͍෯޿͍ػೳΛ ϋϯζΦϯ෇͖ͰֶशͰ͖·͢ʂ ▸ ΋ͪΖΜΦϯϥΠϯ࣮ࢪରԠʂ
  8. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ໨࣍ ▸ ,VCFSOFUFT͸ԿΛ͢Δ΋ͷ͔ ▸ ,VCFSOFUFTͷΞʔΩςΫνϟ

    ▸ ίϯςφ؅ཧʢ%FQMPZNFOUɺ3FQMJDB4FUɺ1PEʣ ▸ Ϋϥελʔ಺Ͱͷ௨৴ʢ4FSWJDFʣ ▸ Ϋϥελʔ֎ͱͷ௨৴ʢ*OHSFTTʣ ▸ ,VCFSOFUFTΛ࢖͏લʹߟ͑Δ΂͖͜ͱ  ຊ೔ͷείʔϓ
  9. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ໨࣍ ▸ ,VCFSOFUFT͸ԿΛ͢Δ΋ͷ͔ ▸ ,VCFSOFUFTͷΞʔΩςΫνϟ

    ▸ ίϯςφ؅ཧʢ%FQMPZNFOUɺ3FQMJDB4FUɺ1PEʣ ▸ Ϋϥελʔ಺Ͱͷ௨৴ʢ4FSWJDFʣ ▸ Ϋϥελʔ֎ͱͷ௨৴ʢ*OHSFTTʣ ▸ ,VCFSOFUFTΛ࢖͏લʹߟ͑Δ΂͖͜ͱ 
  10. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTͱ͸ ▸ ଟ਺ͷίϯςφΛ؅ཧ͢Δ ίϯςφΦʔέετϨʔγϣϯγεςϜ ▸

    ίϯςφͷ഑ஔɾ؂ࢹɾࣗಈ෮چͳͲ ▸ $MPVE/BUJWF$PNQVUJOH'PVOEBUJPO $/$' ؅ཧԼͰ044ͱͯ͠։ൃ ▸ ༷ʑͳΫϥ΢υϕϯμʔ͕αϙʔτ͍ͯ͠Δ 
  11. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ؾʹͳΔಡΈํ ▸ ೔ຊޠͩͱʮΫʔόʔωςεʯͱݴ͏ਓ͕ଟ͍ ▸ ӳޠͩͱʮΫʔόωςΟεʯͱݴ͏ਓ͕ଟ͍

    
  12. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LTʁ  ,VCFSOFUFT จࣈ ▸

    ಡΈํ͸ਓͦΕͧΕ ▸ έΠπɺέʔΤΠτΤεɺέʔϋνΤεɺʜ
  13. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ίϯςφΦʔέετϨʔγϣϯγεςϜͱ͸ ▸ ΦʔέετϥͷࢦشऀͷΑ͏ʹɺ ଟ਺ͷίϯςφ ԋ૗ऀ

    Λ؅ཧ͢ΔγεςϜ ▸ ,VCFSOFUFTҎ֎ʹ΋৭ʑ͋Δ͕ɺ ݱࡏ͸࣮࣭,VCFSOFUFTҰڧ 
  14. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTΛ࢖͏ʹ͸ ▸ ύϒϦοΫΫϥ΢υ ▸ "NB[PO&MBTUJD

    $POUBJOFS4FSWJDF GPS,VCFSOFUFT &,4  ▸ "[VSF,VCFSOFUFT 4FSWJDF ",4  ▸ (PPHMF,VCFSOFUFT &OHJOF (,&  ▸ ΦϯϓϨ ▸ LVCFBEN ▸ 7.XBSF5BO[V ,VCFSOFUFT(SJE *OUFHSBUFE&EJUJPO ▸ ϩʔΧϧ1$ ▸ %PDLFS ▸ .JOJLVCF
  15. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D <౾஌ࣝ>,VCFSOFUFTͷىݯ#PSH ▸ (PPHMF͕ࣾίϯςφͱͯ͠ಈ͔͍ͯ͠Δ ࣗࣾαʔϏεΛ؅ཧ͢ΔγεςϜ ▸

    ಺෦γεςϜͳͷͰ044Ͱ͸ͳ͍ ▸ (PPHMFʹΑΓ࿦จ΋ެ։͞Ε͍ͯΔ ▸ ݪจIUUQTSFTFBSDIHPPHMFQVCTQVC ▸ ೔ຊޠ༁IUUQTCMPHJOEVDUPSNFFOUSZ  
  16. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTͷόʔδϣϯϙϦγʔ ▸ ໿ϲ݄ʹճɺϚΠφʔόʔδϣϯϦϦʔε ▸ 044Ͱͷαϙʔτର৅ʢόάϑΟοΫε౳ʣ͸

    ௚ۙͭͷϚΠφʔόʔδϣϯ ▸ ྫɿ͕ϦϦʔε͞ΕͨΒɺ ɹɹαϙʔτର৅͸YɺYɺY ▸ ৽͍͠ϝδϟʔϦϦʔε༧ఆʢYYʣ͸ ࠓͷͱ͜Ζແ͠ 
  17. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ओͳ,VCFSOFUFT͕΍Δ͜ͱ ᶃ Πϯϑϥͷந৅Խ ᶄ ϦιʔεʹԠͨ͡

    ίϯςφ഑ஔ ᶅ ηϧϑώʔϦϯά ᶆ ΦʔτεέʔϦϯά  ᶇ ϩʔϦϯά Ξοϓσʔτ ᶈ αʔϏε σΟεΧόϦ ˍෛՙ෼ࢄ ᶉ ઃఆ஋ͷ؅ཧ
  18. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ᶃΠϯϑϥͷந৅Խ ▸ ͲͷΑ͏ͳΠϯϑϥͰ΋ɺ ։ൃऀଆ͔Β͸ಉ͡Α͏ʹ࢖͏͜ͱ͕Ͱ͖Δ 

    ෺ཧ αʔόʔ W4QIFSF "84 "[VSF ($1 ,VCFSOFUFT
  19. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ᶄϦιʔεʹԠͨ͡ίϯςφ഑ஔ ▸ ֤8PSLFS/PEFʢ7.౳ʣͷ Ϧιʔεঢ়گΛؑΈͯɺ ৽نίϯςφͷ഑ஔΛܾΊΔ

    ▸ $16࢖༻཰ɺϝϞϦ࢖༻ྔ ͳͲͰ൑அ  ίϯςφ ίϯςφ ίϯςφ ίϯςφ ίϯςφ ίϯςφ
  20. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ᶅηϧϑώʔϦϯά ▸ ཧ૝ͷঢ়ଶͱݱࡏͷঢ়ଶΛൺֱͯ͠ɺ ζϨ͕͋ͬͨΒཧ૝ͷঢ়ଶʹ໭͢ 

    ίϯςφ ᶃʮίϯςφ୆͕ ɹཧ૝ʯͱࢦఆ ᶄίϯςφ୆ ɹΛ഑ஔ ίϯςφ ίϯςφ ᶅ8PSLFS/PEFʹো֐ൃੜ ᶆζϨΛݕ஌ ɹˠ৽نʹ୆഑ஔ ৽͍͠ ίϯςφ ✨
  21. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ᶆΦʔτεέʔϦϯά ▸ ෛՙঢ়گʢओʹ$16࢖༻཰ʣ ʹΑͬͯɺίϯςφͷ୆਺Λ ࣗಈతʹ૿ݮͤ͞Δ

    ▸ ୆਺ͷ্ݶɾԼݶɺ $16࢖༻཰ͷᮢ஋ͳͲ͸ ઃఆՄೳ ▸ )PSJ[POUBM1PE"VUPTDBMFS ͷ࡞੒͕ඞཁ  ίϯςφ ίϯςφ ίϯςφ ৽͍͠ ίϯςφ ✨ ৽͍͠ ίϯςφ ✨
  22. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ᶇϩʔϦϯάΞοϓσʔτ ▸ ίϯςφͷόʔδϣϯ ΞοϓΛগͣͭ͠ߦ͏ ͜ͱͰɺμ΢ϯλΠϜ

    ΛθϩʹͰ͖Δ ▸ Ұ౓ʹγϟοτμ΢ϯ ͢Δ୆਺ͳͲ͸ઃఆՄ ೳ  v1.0 v1.0 v1.0 v1.1 ✨ v1.0 v1.0 v1.1 ✨ v1.1 v1.1 v1.0 v1.1 ✨ v1.1
  23. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ᶈαʔϏεσΟεΧόϦˍෛՙ෼ࢄ ▸ ͋Δίϯςφ͔Βผͷίϯςφʹɺ *1ΞυϨεͰ͸ͳ໊͘લͰΞΫηεͰ͖Δ 

    ui api api api api- service http://api-service ෛՙ෼ࢄ
  24. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ᶉઃఆ஋ͷ؅ཧ ▸ $POpH.BQ͓Αͼ4FDSFU ▸ %#ͷ63-ɾϢʔβʔ໊ɾύεϫʔυͳͲͷઃఆ৘ใ

    Λ؅ཧ͢Δ ▸ ઃఆ஋͸ɺ֤ίϯςφʹ؀ڥม਺ͳͲͱͯ͠౉͢͜ͱ ͕Ͱ͖Δ ▸ ຊηογϣϯͰ͸ൣғ֎ 
  25. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFT͕΍Βͳ͍͜ͱ ▸ ίϯςφҎ֎ͷࣗಈ෮چʢ7.΍ϓϩηεͳͲʣ ▸ ΞϓϦέʔγϣϯίʔυͷ؅ཧ΍Ϗϧυ

    ▸ ϩΪϯάɺϞχλϦϯάɺΞϥʔτ ▸ ϛυϧ΢ΣΞͷఏڙ ▸ ίϯςφΠϝʔδͷ؅ཧ  ,VCFSOFUFT͕ ΍Βͳ͍͜ͱ ʹΘΕΘΕਓ͕ؒ ΍Δ΂͖͜ͱ
  26. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ຊষͷ·ͱΊ ▸ ,VCFSOFUFT͸ίϯςφΦʔέετϨʔγϣϯ γεςϜ ▸

    ,VCFSOFUFT͕΍Δ͜ͱɾ΍Βͳ͍͜ͱΛ ͔ͬ͠Γ೺Ѳ͠Α͏ 
  27. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ໨࣍ ▸ ,VCFSOFUFT͸ԿΛ͢Δ΋ͷ͔ ▸ ,VCFSOFUFTͷΞʔΩςΫνϟ

    ▸ ίϯςφ؅ཧʢ%FQMPZNFOUɺ3FQMJDB4FUɺ1PEʣ ▸ Ϋϥελʔ಺Ͱͷ௨৴ʢ4FSWJDFʣ ▸ Ϋϥελʔ֎ͱͷ௨৴ʢ*OHSFTTʣ ▸ ,VCFSOFUFTΛ࢖͏લʹߟ͑Δ΂͖͜ͱ 
  28. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ίϯςφͱ1PE ▸ 1PE͸ɺͭҎ্ͷίϯςφΛ ࣋ͭ ▸

    ଟ͘ͷέʔεͰ͸ίϯςφͷΈ ▸ αΠυΧʔͱݺ͹ΕΔͭ໨ͷ ίϯςφΛؚΉ͜ͱ΋͋Δ ▸ ,VCFSOFUFT͸ɺ 1PEΛ࠷খ୯Ґͱͯ͠؅ཧ  Pod ίϯςφ
  29. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D .BTUFS/PEFͱ8PSLFS/PEF ▸ .BTUFS/PEF ▸ ,VCFSOFUFTશମΛ؅ཧ͢Δ7.·ͨ͸෺ཧαʔόʔ

    ▸ ୯ʹʮ.BTUFSʯͱ΋ݺͿ ▸ 8PSLFS/PEF ▸ ࣮ࡍʹ1PEΛಈ͔͢7.·ͨ͸෺ཧαʔόʔ ▸ ୯ʹʮ/PEFʯͱ΋ݺͿ 
  30. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTͷશମ૾  kube-apiserver kube-controller -manager

    kube- scheduler etcd .BTUFS/PEF 8PSLFS/PEFT ؅ཧऀPS ։ൃऀ kube- proxy kube let LVCFDUM ίϚϯυ ˞.BTUFS/PEF΋ෳ਺୆Ͱߏ੒Մೳ Pod
  31. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMίϚϯυͱLVCFBQJTFSWFS ▸ ؅ཧऀPS։ൃऀ͸ ᶃ ʮཧ૝ͷঢ়ଶʯΛϚχϑΣετʢ:".-ʣʹهड़

    ᶄ ϚχϑΣετΛLVCFDUMίϚϯυͰΞοϓϩʔυ ʢ಺෦తʹ͸)551Λ࢖༻ʣ ▸ LVCFBQJTFSWFS͸ ᶅ ϚχϑΣετΛड৴ɾղੳ ᶆ ͦͷσʔλΛFUDEʹอଘ  ྫɿ/HJOYͷ1PE͕୆ɺ ɹɹ.Z42-ͷ1PE͕୆ ಡΈํ͸ ʮΩϡʔϒίϯτϩʔϧʯ
  32. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMίϚϯυͱLVCFBQJTFSWFS  kube-apiserver etcd Ϛχ

    ϑΣετ ᶃϚχϑΣετ ɹΛ࡞੒ ᶄLVCFDUMͰ ɹΞοϓϩʔυ ɹ )551 ᶅϚχϑΣετΛ ɹड৴ɾղੳ ᶆղੳͨ͠ ɹσʔλΛ ɹอଘ
  33. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D FUDE ▸ ʮཧ૝ͷঢ়ଶʯͱ ʮݱࡏͷঢ়ଶʯ͕ อଘ͞Ε͍ͯΔ

    ▸ :".-Ͱอଘ͞Ε͍ͯ Δͱղऍͯ͠΋0, ▸ LVCFBQJTFSWFS͔Β ͷΈΞΫηεՄೳ  kube-apiserver etcd ཧ૝ /HJOY୆ .Z42-୆ ݱࡏ /HJOY୆ .Z42-୆
  34. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFBQJTFSWFS ▸ ,VCFSOFUFTͷ৺ଁ෦ ▸ 3&45GVM8FCαʔϏε

    ▸ ଞͷίϯϙʔωϯτ͸ɺ LVCFBQJTFSWFSΛ௨ͯ͡ FUDE΁ͷ$36%Λߦ͏  kube-apiserver etcd ཧ૝ /HJOY୆ .Z42-୆ ᶅϚχϑΣετΛ ɹड৴ɾղੳ ᶆղੳͨ͠ ɹσʔλΛอଘ
  35. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFTDIFEVMFS ▸ ఆظతʹLVCFBQJTFSWFSʹ ΞΫηεͯ͠ɺ ▸

    8PSLFS/PEF͕ະܾఆͷ 1PE͕ແ͍͔νΣοΫ ▸ ະܾఆͳ1PEͷ 8PSLFS/PEFΛܾఆͯ͠ FUDEʹॻ͖ࠐΉ  kube-apiserver etcd kube-scheduler 1PE৘ใ ۭ ˠ/PEF
  36. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDPOUSPMMFSNBOBHFS ▸ ෳ਺ͷ$POUSPMMFSΛ ؅ཧ͍ͯ͠Δ ▸

    ۩ମྫ͸ޙड़ ▸ ֤$POUSPMMFS͸ɺ ఆظతʹ LVCFBQJTFSWFSʹ ΞΫηεͯ͠FUDEʹ $36%Λߦ͍ͬͯΔ  kube-apiserver etcd kube-controller-manager A Cont roller B Cont roller C Cont roller
  37. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTͷશମ૾ ࠶ܝ  kube-apiserver kube-controller

    -manager kube- scheduler etcd .BTUFS/PEF ؅ཧऀPS ։ൃऀ LVCFDUM ίϚϯυ ͜͜·Ͱ 8PSLFS/PEFT kube- proxy kube let Pod
  38. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFQSPYZ ▸ 8PSLFS/PEFʹೖͬͯ͘Δ௨৴΍ ग़͍ͯ͘௨৴͸ɺ શͯLVCFQSPYZΛܦ༝͢Δ

    ▸ αʔϏεσΟεΧόϦ ˍෛՙ෼ࢄͷཁ ▸ ৄࡉ͸ޙड़ ▸ ֤8PSLFS/PEFʹ͚ͭͩଘࡏ  kube- proxy kube let Pod
  39. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFMFU ▸ ఆظతʹLVCFBQJTFSWFSʹ ΞΫηεͯ͠ɺ ▸

    ࣗ8PSLFS/PEFͰ৽نʹಈ͔͢ 1PE͕ແ͍͔νΣοΫ͠ɺ ͋ͬͨΒίϯςφΛ࡞੒͢Δ ▸ ࣗ8PSLFS/PEF಺ͷ֤1PEΛ ؂ࢹ͠ɺݱࡏͷঢ়ଶΛFUDEʹॻ͖ࠐΉ ▸ ֤8PSLFS/PEFʹ͚ͭͩଘࡏ  kube- proxy kube let kube-apiserver etcd ৽͍͠ Pod ✨
  40. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTͷશମ૾ ࠶ܝ  kube-apiserver kube-controller

    -manager kube- scheduler etcd .BTUFS/PEF ؅ཧऀPS ։ൃऀ LVCFDUM ίϚϯυ 8PSLFS/PEFT kube- proxy kube let Pod
  41. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ࣮͸ʮࢦشऀʯ͸ଘࡏ͠ͳ͍ ▸ ֤ίϯϙʔωϯτ͕ࣗ཯తʹಈ͘͜ͱͰɺ શମ্͕ख͘ಈ͍͍ͯΔ ▸

    LVCFBQJTFSWFS͸ɺ֤ίϯϙʔωϯτʹඞཁͳ σʔλΛಧ͚ͨΓ͢ΔͷΈ ▸ ೴ʢ࢘ྩౝʣͰ͸ͳ͘৺ଁʢσʔλͷϙϯϓʣ 
  42. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ύϒϦοΫΫϥ΢υͷ,VCFSOFUFT ▸ .BTUFS/PEFɾ8PSLFS/PEFͷ7.΍ɺ ͦΕΒͰಈ֤͘ίϯϙʔωϯτΛ༻ҙͯ͘͠ΕΔ ▸

    ϘλϯͭͰ্هͷ༻ҙ΍ɺ֤ίϯϙʔωϯτͷ όʔδϣϯΞοϓΛͯ͘͠ΕΔ  ਓ͕ؒ1PEͷ࡞੒ʹ ूதͰ͖Δ͜ͱ͕ϝϦοτ
  43. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ຊষͷ·ͱΊ ▸ 1PE͸ͭҎ্ͷίϯςφΛ࣋ͭ ▸ ͜Ε͕؅ཧͷ࠷খ୯Ґ

    ▸ .BTUFS/PEF ▸ LVCFBQJTFSWFS͕৺ଁ෦ ▸ 8PSLFS/PEF ▸ ͜͜Ͱ1PE͕ಈ͘ 
  44. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ໨࣍ ▸ ,VCFSOFUFT͸ԿΛ͢Δ΋ͷ͔ ▸ ,VCFSOFUFTͷΞʔΩςΫνϟ

    ▸ ίϯςφ؅ཧʢ%FQMPZNFOUɺ3FQMJDB4FUɺ1PEʣ ▸ Ϋϥελʔ಺Ͱͷ௨৴ʢ4FSWJDFʣ ▸ Ϋϥελʔ֎ͱͷ௨৴ʢ*OHSFTTʣ ▸ ,VCFSOFUFTΛ࢖͏લʹߟ͑Δ΂͖͜ͱ 
  45. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D %FQMPZNFOUɺ3FQMJDB4FUɺ1PE ▸ 3FQMJDB4FU͸ 1PEͷ୆਺Λ؅ཧ ▸

    ୆਺Λཧ૝ͷঢ়ଶʹอͭ ▸ %FQMPZNFOU͸ 3FQMJDB4FUΛ؅ཧ ▸ 1PEͷ಺༰͕มΘͬͨΒ ৽͍͠3FQMJDB4FUΛ࡞Δ ▸ ϩʔϦϯάΞοϓσʔτ΋୲౰  Pod Pod Pod ReplicaSet Deployment
  46. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D %FQMPZNFOUͷϚχϑΣετΛॻ͘  apiVersion: apps/v1 kind:

    Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 ͜ͷ%FQMPZNFOUͷ໊લʢ೚ҙʣ 1PEͷ୆਺ ͜ͷ%FQMPZNFOU͸ɺ ͜ͷϥϕϧΛ࣋ͭ1PEΛ؅ཧ͢Δ 1PEͷఆٛ 1PE಺ͷίϯςφΠϝʔδ 1PEʹ෇͚Δϥϕϧ
  47. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ϚχϑΣετϑΝΠϧͷΞοϓϩʔυ ▸ ϑΝΠϧ໊ࢦఆ  $

    kubectl apply -f ϚχϑΣετϑΝΠϧ໊ $ kubectl apply -f ϑΥϧμ໊ ▸ ϑΥϧμ಺ͷશϚχϑΣετΛΞοϓϩʔυ
  48. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ݱࡏͷঢ়ଶͷऔಘ  $ kubectl get

    all NAME READY STATUS RESTARTS AGE pod/nginx-deployment-5754944d6c-mjw9j 1/1 Running 0 22s pod/nginx-deployment-5754944d6c-t4fpj 1/1 Running 0 22s pod/nginx-deployment-5754944d6c-xv7lm 1/1 Running 0 22s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/nginx-deployment 3/3 3 3 22s NAME DESIRED CURRENT READY AGE replicaset.apps/nginx-deployment-5754944d6c 3 3 3 22s
  49. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ݱࡏͷঢ়ଶ  Pod nginx-deployment -xxx-bbb

    ReplicaSet nginx-deployment-xxx Deployment nginx-deployment Pod nginx-deployment -xxx-aaa Pod nginx-deployment -xxx-ccc
  50. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 1PEͷΈͷ৘ใऔಘ  $ kubectl get

    pods NAME READY STATUS RESTARTS AGE nginx-deployment-5754944d6c-mjw9j 1/1 Running 0 4m7s nginx-deployment-5754944d6c-t4fpj 1/1 Running 0 4m7s nginx-deployment-5754944d6c-xv7lm 1/1 Running 0 4m7s ▸ Լه΋Մೳ ▸ kubectl get replicasets ▸ kubectl get deployments
  51. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ݸผ1PEͷৄࡉ৘ใऔಘ  $ kubectl describe

    pod/nginx- deployment-5754944d6c-mjw9j Name: nginx-deployment-5754944d6c-mjw9j Namespace: default Priority: 0 Node: docker-desktop/192.168.65.3 Start Time: Xxx, xx xxx 2020 17:02:57 +0900 Labels: app=nginx pod-template-hash=5754944d6c Annotations: <none> Status: Running IP: 10.1.0.93 IPs: <none> Controlled By: ReplicaSet/nginx-deployment-5754944d6c ...
  52. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMBQQMZ͔Β1PE͕࡞ΒΕΔ·Ͱ  kube-apiserver etcd Ϛχ

    ϑΣετ ᶃ%FQMPZNFOUͷ ɹϚχϑΣετ ɹΛ࡞੒ ᶄLVCFDUMBQQMZ ᶅϚχϑΣετΛ ɹड৴ɾղੳ ᶆ%FQMPZNFOUΛ ɹFUDEʹ࡞੒ %FQMPZ NFOU ✨
  53. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMBQQMZ͔Β1PE͕࡞ΒΕΔ·Ͱ  Deployment Controller kube-controller-manager

    kube-apiserver etcd %FQMPZ NFOU ReplicaSet Controller 3FQMJDB 4FU ✨ ᶇ%FQMPZNFOU࡞੒Λݕ஌ ɹˠ3FQMJDB4FUΛ࡞੒
  54. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMBQQMZ͔Β1PE͕࡞ΒΕΔ·Ͱ  Deployment Controller kube-controller-manager

    kube-apiserver etcd %FQMPZ NFOU ReplicaSet Controller 3FQMJDB 4FU ᶈ3FQMJDB4FU࡞੒Λݕ஌ ɹˠ1PEΛඞཁݸ਺࡞੒ 1PE 1PE 1PE ✨
  55. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMBQQMZ͔Β1PE͕࡞ΒΕΔ·Ͱ  kube-scheduler kube-apiserver etcd

    %FQMPZ NFOU 3FQMJDB 4FU ᶉ8PSLFS/PEF͕ ɹະࢦఆͷ1PEΛݕ஌ ɹˠܾఆͯ͠ॻ͖ࠐΉ 1PE ۭ ˠ /PEF 1PE ۭ ˠ /PEF 1PE ۭ ˠ /PEF
  56. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMBQQMZ͔Β1PE͕࡞ΒΕΔ·Ͱ  kube-apiserver etcd %FQMPZ

    NFOU 3FQMJDB 4FU ᶊࣗ8PSLFS/PEFѼͷ ɹ1PEΛݕ஌ ɹˠ1PEΛ৽ن࡞੒ 1PE ۭ ˠ /PEF 1PE ۭ ˠ /PEF 1PE ۭ ˠ /PEF kube- proxy kube let ৽͍͠ Pod ✨
  57. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ຊষͷ·ͱΊ ▸ %FQMPZNFOUˠ3FQMJDB4FUˠ1PE ▸ ͜ΕΒ͸શͯFUDEʹ࡞੒͞ΕΔ

    ▸ ϚχϑΣετΛॻ͍ͯkubectl applyͰ Ξοϓϩʔυ ▸ %FQMPZNFOU$POUSPMMFSɺ 3FQMJDB4FU$POUSPMMFSɺLVCFMFU͕͏·͘ಈ͘ 
  58. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ໨࣍ ▸ ,VCFSOFUFT͸ԿΛ͢Δ΋ͷ͔ ▸ ,VCFSOFUFTͷΞʔΩςΫνϟ

    ▸ ίϯςφ؅ཧʢ%FQMPZNFOUɺ3FQMJDB4FUɺ1PEʣ ▸ Ϋϥελʔ಺Ͱͷ௨৴ʢ4FSWJDFʣ ▸ Ϋϥελʔ֎ͱͷ௨৴ʢ*OHSFTTʣ ▸ ,VCFSOFUFTΛ࢖͏લʹߟ͑Δ΂͖͜ͱ 
  59. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 1PEؒͰͲ͏΍ͬͯ௨৴͢Δʁ ▸ ֤1PE͝ͱʹ*1ΞυϨεׂ͕Γ౰ͯΒΕΔ  $

    kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginx-deployment-5754944d6c-mjw9j 1/1 Running 0 20h 10.1.0.98 docker-desktop <none> <none> nginx-deployment-5754944d6c-t4fpj 1/1 Running 0 20h 10.1.0.99 docker-desktop <none> <none> nginx-deployment-5754944d6c-xv7lm 1/1 Running 0 20h 10.1.0.101 docker-desktop <none> <none>
  60. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D *1ΞυϨε͸౰ͯʹͳΒͳ͍ ▸ 1PEͷ਺͸ৗʹ૿ݮ͍ͯ͠Δ ▸ ͖ͬ͞௨৴ͨ͠1PE͸΋͏ফ͍͑ͯΔ͔΋

    ▸ ௨৴૬ख͸ෳ਺1PEʹ৑௕Խ͞Ε͍ͯΔ͔΋ ▸ ͲΕʹΞΫηε͢ΔʁͲ͏΍ͬͯෛՙ෼ࢄ͢Δʁ ▸ *1ΞυϨεͰ͸ͳ໊͘લͰ63-Λࢦఆ͍ͨ͠ ▸ %/4͸Ͳ͏͢Δʁ 
  61. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 4FSWJDFͰαʔϏεσΟεΧόϦˍෛՙ෼ࢄ  Service nginx- service

    10.x.x.x (8080) http://nginx-service:8080 ˞஫ɿਤ͸ΠϝʔδͰ͢ ʢৄࡉ͸ޙड़ʣ Pod nginx 10.y.y.a (80) Pod nginx 10.y.y.b (80) Pod nginx 10.y.y.c (80) ผͷPod ෛՙ ෼ࢄ
  62. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 4FSWJDFͷϚχϑΣετΛॻ͘  apiVersion: v1 kind:

    Service metadata: name: nginx-service spec: type: ClusterIP selector: app: nginx ports: - port: 8080 targetPort: 80 ͜ͷ4FSWJDF͸ɺ ͜ͷϥϕϧΛ࣋ͭ1PEʹ ෛՙ෼ࢄ͢Δ 1PEͷϙʔτ൪߸ 4FSWJDFͷϙʔτ൪߸ 4FSWJDFͷ໊લʢ೚ҙʣ
  63. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMBQQMZ͢Δͱ  $ kubectl get

    service nginx-service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE nginx-service ClusterIP 10.96.181.49 <none> 8080/TCP 6m54s ▸ 4FSWJDF͕࡞੒͞Εɺ*1ΞυϨεͱϙʔτ൪߸͕ ׂΓ౰ͯΒΕΔ ▸ ஫ɿ͜Ε͸ϓϥΠϕʔτ*1ΞυϨεͳͷͰɺ ɹɹ,VCFSOFUFTΫϥελʔ಺ͷΈͰ͔͠࢖͑ͳ͍
  64. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 1PEؒ௨৴Λࢼ͢ ▸ Ұ࣌తͳ$FOU04ͷ1PEΛ࡞Γɺ ͔ͦ͜ΒDVSMͰΞΫηε͢Δ 

    $ kubectl run temp --image=centos \ --rm --restart=Never -it \ -- curl http://nginx-service:8080 <!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> Cent OS nginx nginx nginx Service
  65. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 4FSWJDF࡞੒͔Βෛՙ෼ࢄ·Ͱ  kube-apiserver etcd Ϛχ

    ϑΣετ ᶃ4FSWJDFͷ ɹϚχϑΣετ ɹΛ࡞੒ ᶄLVCFDUMBQQMZ ᶅϚχϑΣετΛ ɹड৴ɾղੳ ᶆ4FSWJDFΛFUDEʹ࡞੒ *1ΞυϨε΋෇Ճ͞ΕΔ 4FSWJDF ✨ %FQMPZ NFOU 3FQMJDB 4FU 1PE
  66. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 4FSWJDF࡞੒͔Βෛՙ෼ࢄ·Ͱ  kube- proxy kube

    let kube-apiserver etcd 4FSWJDF %FQMPZ NFOU 3FQMJDB 4FU 1PE Pod ᶇ4FSWJDF࡞੒Λݕ஌ ɹˠ4FSWJDFͱ෼ࢄର৅1PEͷ ɹɹ*1ΞυϨεɾϙʔτ൪߸Λऔಘ ɹˠJQUBCMFTʹ௥Ճ ˞JQUBCMFTҎ֎ͷ৔߹΋͋Γ·͢
  67. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D JQUBCMFT 8JLJQFEJBΑΓ ▸ JQUBCMFT͸ɺ-JOVYʹ࣮૷͞ΕͨύέοτϑΟϧ λϦϯά͓ΑͼωοτϫʔΫΞυϨεม׵

    /"5 ػೳͰ͋Δ/FUpMUFSʢෳ਺ͷ/FUpMUFSϞ δϡʔϧͱ࣮ͯ͠૷͞Ε͍ͯΔʣͷઃఆΛૢ࡞͢ ΔίϚϯυͷ͜ͱɻ/FUpMUFS͸ɺ͍ΘΏΔϑΝ ΠΞ΢Υʔϧ΍ϧʔλͱͯ͠ͷ໾ׂΛՌͨ͢ɻ  https://ja.wikipedia.org/wiki/Iptables
  68. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 4FSWJDF࡞੒͔Βෛՙ෼ࢄ·Ͱ  kube- proxy Pod

    temp DNS ᶈ%/4ʹ4FSWJDF໊ͷ ɹ໊લղܾΛґཔ ɹˠ4FSWJDFͷ*1ΞυϨεΛऔಘ
  69. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D %/4 ▸ ,VCFSOFUFTΫϥελʔ಺ʹଘࡏ͢Δ %/4αʔόʔ ▸

    ඞਢͷίϯϙʔωϯτͰ͸ͳ͍͕ɺ ͍͍ͩͨͷ,VCFSOFUFT؀ڥʹ͸ೖ͍ͬͯΔ ▸ .BTUFS/PEFͷίϯϙʔωϯτ͔Ͳ͏͔͸ෆ໌ ▸ %PDLFS΍(,&Ͱ͸1PEͱͯ͠ಈ͍͍ͯΔ 
  70. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 4FSWJDF࡞੒͔Βෛՙ෼ࢄ·Ͱ  kube- proxy Pod

    temp kube- proxy Pod nginx ᶉ4FSWJDFͷ ɹ*1ϙʔτ൪߸ ɹʹΞΫηε ᶊJQUBCMFTΛ࢖ͬͯɺ ɹѼઌ*1ɾϙʔτΛ ɹ͍ͣΕ͔ͷ1PEͷ ɹ΋ͷʹมߋ kube- proxy Pod nginx kube- proxy Pod nginx ᶋมߋ͞ΕͨѼઌʹΞΫηε
  71. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D  kube-proxy Pod temp kube-

    proxy kube- proxy kube- proxy 1PE OHJOY  1PE OHJOY   1PE OHJOY  ServiceͷIPΞυϨεͱϙʔτ൪߸ =10.9.9.9:8080 ͦͷService͕؅ཧ͢ΔPodͷ IPΞυϨεͱϙʔτ൪߸ ʹ10.0.0.1:80, 10.0.0.2:80, 10.0.0.3:80 ᶉ http://10.9.9.9:8080/ ᶋ http://10.0.0.2:80/ ᶊѼઌIPΞυϨεɾϙʔτ൪߸ ɹΛॻ͖׵͑ʢ3ͭΛॱ൪ʹ࢖͏ʣ
  72. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ຊষͷ·ͱΊ ▸ 4FSWJDFͰΫϥελʔ಺αʔϏεσΟεΧόϦͱ ෛՙ෼ࢄΛ࣮ݱ ▸

    4FSWJDFͷਖ਼ମ͸ %/4 LVCFQSPYZ JQUBCMFT ▸ ͨͩ͠؀ڥʹΑΔ 
  73. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ໨࣍ ▸ ,VCFSOFUFT͸ԿΛ͢Δ΋ͷ͔ ▸ ,VCFSOFUFTͷΞʔΩςΫνϟ

    ▸ ίϯςφ؅ཧʢ%FQMPZNFOUɺ3FQMJDB4FUɺ1PEʣ ▸ Ϋϥελʔ಺Ͱͷ௨৴ʢ4FSWJDFʣ ▸ Ϋϥελʔ֎ͱͷ௨৴ʢ*OHSFTTʣ ▸ ,VCFSOFUFTΛ࢖͏લʹߟ͑Δ΂͖͜ͱ 
  74. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D 4FSWJDFͷ໰୊఺ ▸ Ϋϥελʔ಺ͷ௨৴͔͠Ͱ͖ͳ͍ ▸ 4FSWJDFͷUZQFΛʮ/PEF1PSUʯʮ-PBE#BMBODFSʯ

    ʹมߋ͢Ε͹Մೳʢࠓճ͸είʔϓ֎ʣ ▸ -ɾ-Ϩϕϧͷ৘ใ͔͠ݟͳ͍ ▸ )551௨৴ͷ63-Λݟͯʮ͜ͷ63-ͳΒ͜ͷ1PEʯ ͷΑ͏ͳ෼ࢄ͸Ͱ͖ͳ͍ 
  75. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D *OHSFTTͰΫϥελʔ֎௨৴  Ϋϥ΢υϕϯμʔͷ ϩʔυόϥϯαʔ Ingress

    Controller Service A Service B Pod A Pod A Pod B Pod B 63-ʹΑͬͯ ৼΓ෼͚Δ ෛՙ ෼ࢄ ෛՙ ෼ࢄ
  76. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D /(*/9*OHSFTT$POUSPMMFS ▸ *OHSFTT$POUSPMMFS࣮૷ͷͭ ▸ ໊લͷ௨Γ/HJOYΛ࢖͍ͬͯΔ

    ▸ ؀ڥผΠϯετʔϧํ๏͸Լهࢀর ▸ IUUQTLVCFSOFUFTHJUIVCJPJOHSFTTOHJOY EFQMPZ ▸ ࠓճ͸(,&Λར༻ 
  77. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D /(*/9*OHSFTT$POUSPMMFSͷΠϯετʔϧ (,&  $ kubectl

    create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user $(gcloud config get- value account) $ kubectl apply -f https:// raw.githubusercontent.com/kubernetes/ ingress-nginx/controller-v0.34.0/deploy/ static/provider/cloud/deploy.yaml
  78. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ΠϯετʔϧͰ࡞ΒΕΔ΋ͷ  Ϋϥ΢υϕϯμʔͷ ϩʔυόϥϯαʔ NGINX

    Ingress Controller (Pod) Service A Service B Pod A Pod A Pod B Pod B ˞ଞʹ΋৭ʑ࡞ΒΕΔͷͰ͕͢ɺॏཁͳͷ͸͜ͷͭͰ͢
  79. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D *OHSFTTͷϚχϑΣετΛॻ͘  kind: Ingress apiVersion:

    networking.k8s.io/v1beta1 metadata: name: echo-ingress labels: app: echo annotations: kubernetes.io/ingress.class: nginx spec: rules: - http: paths: - path: /a backend: serviceName: echo-a-service servicePort: 80 - path: /b backend: serviceName: echo-b-service servicePort: 80 ͜ͷαʔϏεʹ ϧʔςΟϯά ͜ͷ63-͕ϦΫΤετ͞ΕͨΒ *OHSFTTͷ໊લʢ೚ҙʣ ͜ͷ63-͕ϦΫΤετ͞ΕͨΒ ͜ͷαʔϏεʹ ϧʔςΟϯά
  80. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D LVCFDUMBQQMZ͢Δͱ  $ kubectl get

    ingress NAME HOSTS ADDRESS PORTS AGE echo-ingress * 34.71.xxx.xxx 80 63m ▸ *OHSFTT͕࡞੒͞Εɺ*1ΞυϨεͱϙʔτ൪߸͕ ׂΓ౰ͯΒΕΔ ▸ ͜Ε͸Ϋϥ΢υϕϯμʔͷϩʔυόϥϯαʔͷ *1ΞυϨε
  81. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ΞΫηε  $ curl 34.71.xxx.xxx/a

    A(echo-a-deployment-dd985bcfc-fcjpf) $ curl 34.71.xxx.xxx/a A(echo-a-deployment-dd985bcfc-qk6hp) $ curl 34.71.xxx.xxx/b B(echo-b-deployment-68854964db-zjcmh) $ curl 34.71.xxx.xxx/b B(echo-b-deployment-68854964db-qrr2n) ▸ 63-ʹΑͬͯҧ͏4FSWJDFʹϧʔςΟϯά͞Ε͍ͯΔ
  82. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ຊষͷ·ͱΊ ▸ ·ͣ*OHSFTT$POUSPMMFSͷΠϯετʔϧ͕ඞཁ ▸ ϩʔυόϥϯαʔͱ*OHSFTT$POUSPMMFSͷ1PE͕

    ࡞ΒΕΔ ▸ *OHSFTTΛ࡞੒͢Δ͜ͱͰɺΫϥελʔ֎͔Βͷ ΞΫηε΍63-ͰͷϧʔςΟϯά͕ՄೳʹͳΔ 
  83. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ໨࣍ ▸ ,VCFSOFUFT͸ԿΛ͢Δ΋ͷ͔ ▸ ,VCFSOFUFTͷΞʔΩςΫνϟ

    ▸ ίϯςφ؅ཧʢ%FQMPZNFOUɺ3FQMJDB4FUɺ1PEʣ ▸ Ϋϥελʔ಺Ͱͷ௨৴ʢ4FSWJDFʣ ▸ Ϋϥελʔ֎ͱͷ௨৴ʢ*OHSFTTʣ ▸ ,VCFSOFUFTΛ࢖͏લʹߟ͑Δ΂͖͜ͱ 
  84. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ϚΠΫϩαʔϏε΍Γ·͔͢ʁ ▸ ϚΠΫϩαʔϏεͰͳ͍ͳΒ,VCFSOFUFT͸ ඞཁͳ͍ ▸

    ϚΠΫϩαʔϏεͰ͋ͬͯ΋ ʮ,VCFSOFUFT͸αʔϏε͕਺ेʹͳ͔ͬͯΒʯ ʢCZླ໦༤հ͞Μʣ ▸ IUUQTXXXTMJEFTIBSFOFUZVTVLF TT 
  85. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ϚΠΫϩαʔϏε΁ͷ४උ͸0,Ͱ͔͢ʁ ▸ ಺੡Խ͍ͯ͠·͔͢ʁ ▸ $*$%ମ੍͸੔͍ͬͯ·͔͢ʁ

    ▸ ʰϓϩμΫγϣϯϨσΟɾϚΠΫϩαʔϏεʱ͸ ಡΈ·͔ͨ͠ʁ ▸ ٕज़త೉қ౓͕ඈ༂తʹߴ·Δ͜ͱ͸৫ΓࠐΈ ࡁΈͰ͔͢ʁ 
  86. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTͰϚϧνΫϥ΢υʁ ▸ ,VCFSOFUFT͚ͩͰ͸ϚϧνΫϥ΢υ͸࣮ݱͰ͖ͳ͍ ▸ ϕϯμʔಠࣗαʔϏεΛ࢖ͬͯͨΒΞ΢τ

    ▸ ׬શʹ͸Ϋϥ΢υϕϯμʔϩοΫΠϯΛճආͰ͖ͳ͍ ▸ ίϯςφϥϯλΠϜͷҧ͍ͳͲ ▸ ϚϧνΫϥ΢υͰՄ༻ੑ͸ඞͣ͠΋্͕Βͳ͍ ▸ ;0;0ͷݕ౼ఀࢭࣄྫ IUUQTRJJUBDPNTPOPUTJUFNTGEFFBFF 
  87. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFTͷӡ༻ମ੍͸੔͍ͬͯ·͔͢ʁ ▸ ,VCFSOFUFTઐ೚͕ෳ਺໊ඞཁ ▸ ͸ͯͳͷఫୀࣄྫ

    IUUQTXXXBUNBSLJUDPKQBJUBSUJDMFT OFXTIUNM ▸ ϲ݄ʹճͷΞοϓσʔτʹ଱͑ΒΕΔ͔ʁ ▸ ΞϓϦέʔγϣϯͷςετɺؔ࿈044ͷςετɺ 7.ͷ04ΞοϓσʔτɺϑΝʔϜ΢ΣΞͷΞοϓσʔτ ͳͲ΋ඞཁ 
  88. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ,VCFSOFUFT͡Όͳͯ͘΋ྑ͍ͷͰ͸ʁ ▸ $*$%ମ੍Λ੔͑Δ͚ͩͰ΋૬౰ͳޮՌ͕͋Δ ͷͰ͸ʁ ▸

    1BB4Λ׆༻ͨ͠΄͏͕ྑ͍ͷͰ͸ʁ ▸ ʮΞϓϦέʔγϣϯΛಈ͔͢ʯͱ͍͏؍఺Ͱ͸ ,VCFSOFUFTΑΓ΋ߴػೳ 
  89. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ͓͢͢Ίॻ੶  ▸ ΤίγεςϜͱ ࢓૊ΈΛ஌Δ

    ▸ ΑΓਂ͘ ࢓૊ΈΛ஌Δ ▸ ܾఆ൛త ϦϑΝϨϯε ॕɾୈ൛ʂʂ
  90. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ίϛϡχςΟʹߦͬͯΈΑ͏ ▸ ,VCFSOFUFT.FFUVQ5PLZP ▸ IUUQTLTKQDPOOQBTTDPN

    ▸ $MPVE/BUJWF.FFUVQ5PLZP ▸ IUUQTDMPVEOBUJWFDPOOQBTTDPN ▸ $MPVE/BUJWF%FWFMPQFST+1 ▸ IUUQTDOEDPOOQBTTDPN 
  91. $ $"4"3&"- *OD"MMSJHIUTSFTFSWFE #CNDT2020 #CNDT2020_D ࠷ޙͷ·ͱΊ ▸ ,VCFSOFUFTͷ΍Δ͜ͱɾ΍Βͳ͍͜ͱΛ೺Ѳ͠Α ͏ ▸

    ֤ίϯϙʔωϯτ͕ࣗ཯తʹಈ͘͜ͱͰɺ ݁Ռతʹશମ্͕ख͘ಈ͍͍ͯΔ ▸ 1PEɾ3FQMJDB4FUɾ%FQMPZNFOUɾ4FSWJDFɾ *OHSFTTΛ·ͣཧղ͠Α͏ ▸ Կ͕͍ͨ͠ͷ͔ɺຊ൪౤ೖલʹ͔ͬ͠Γߟ͑Α͏