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

初心者がk8sの勉強の為に自作ブログをEKSで運用した時の妥協ポイントとお財布事情

po3rin
June 30, 2020

 初心者がk8sの勉強の為に自作ブログをEKSで運用した時の妥協ポイントとお財布事情

po3rin

June 30, 2020
Tweet

More Decks by po3rin

Other Decks in Programming

Transcript

  1. ॳ৺ऀ͕LTͷษڧͷҝʹࣗ࡞ϒϩάΛ&,4Ͱ
    ӡ༻ͨ࣌͠ͷଥڠϙΠϯτͱ͓ࡒ෍ࣄ৘
    Kubernetes Novice Tokyo #2
    Jun 30, 2020 @ po3rin

    View full-size slide

  2. pon ( @po3rin )

    View full-size slide

  3. Introduction
    \

    View full-size slide

  4. ࣾ಺Ͱ&,4΁ͷҠߦϓϩδΣΫτ͕࢝·ͬͨͷͰษڧͷͨΊʹԿ͔Λ
    LTͰϚωʔδυͰӡ༻ͯ͠Έ͍ͨ✊ ʂʂ

    View full-size slide

  5. ͦ͜ͰಘͨԼه஌ݟΛओʹڞ༗
    ίετͷ੾Γ٧Ί
    ίετͷͨΊʹଥڠͨ͠ϙΠϯτ
    ͜Ε͔ΒLTΛϚωʔδυͰΨοπϦษڧ͢Δਓͷҝʹͳ
    Ε͹޾͍

    View full-size slide

  6. &,4Ͱӡ༻ͯ͠Δϒϩά✌
    QPSJODPN

    View full-size slide

  7. ϒϩάͷΞʔΩςΫνϟ✌

    View full-size slide

  8. Կ΋ߟ͑ͣॳΊͯ&,4Λ࢖ͬͨ࣌%BZ
    ͜Ε͸݄ͷ੫ۚ
    ࠓམͪண͍ͯΔ஍఺
    %BZ
    ൓লظؒ

    View full-size slide

  9. ࣮ࡍͷ݄ͷ࣮੷
    ࢖͏Ϧιʔε࣍ୈͰ·ͩશવམ
    ͱͤΔɻ͜ͷ໌ࡉʹ͸ແବͳ
    &-#ؚ͕·Ε͍ͯͨͷͰ͔͜͜
    Β͘Β͍མͱͤ·͢ɻ

    View full-size slide

  10. ͋Δఔ౓খ͍͞Ϋϥελߏ੒͔Β࢝ΊΔͷ͕๬·͍͠ɻ
    ίετΛ࠷খݶʹ཈͑ͯඞཁʹͳͬͨΒେ͖͍ͯ͘͘͠ελΠϧ
    ϒϩάΛ্ཱͪ͛Δࡍ΋গͣͭ͠େ͖͍ͯͬͨ͘͠ɻ

    View full-size slide

  11. &,4؅ཧΛίʔυԽ͓ͯ͘͠ͱ*B$ͷݪଇ
    ʮ؆୯ʹ࠶ݱͰ͖ΔγεςϜʯ
    ʮ࢖͍ࣺͯʹͰ͖ΔγεςϜʯ
    ʹΑΓɺ࢖͍ͬͯͳ͍࣌ʹΫϥελΛࢭΊΔ͜ͱ͕Մೳɻ͜Ε͸ࢼߦࡨ
    ޡ࣮ݧஈ֊Ͱ͸ίετ࡟ݮͷͨΊʹ΋༗༻ɻ·ͨ1%$"΋ճ͠΍͘͢
    ͳΔɻ
    *OGSBTUSVDUVSFBT$PEF

    IUUQTXXXPSFJMMZDPKQCPPLT

    View full-size slide

  12. ࣗ෼͸5FSSBGPSNͰ&,4ΫϥελΛ্ཱ͍ͪ͛ͯΔɻ
    Լه5FSSBGPSNϞδϡʔϧ͕ศརɻ
    IUUQTHJUIVCDPNUFSSBGPSNBXTNPEVMFTUFSSBGPSNBXTFLT
    ։ൃ࣌͸ଥڠͯ͠ຖճBQQMZ্ཱ͍ͯͪ͛ͯͨ͠
    ্ཱͪ͛ʹ෼͘Β͍͔͔ΔͷͰ5XJUUFS͕ḿΔ✊

    *OGSBTUSVDUVSFBT$PEF

    View full-size slide

  13. 4QPU*OTUBODF

    "84Ϋϥ΢υ಺ͷ࢖༻͞Ε͍ͯͳ͍&$ΩϟύγςΟʔΛ׆༻͢ΔɻεϙοτΠϯελϯε͸ɺΦϯσ
    Ϛϯυྉۚͱൺ΂࠷େͷׂҾՁ֨Ͱར༻Մೳʂ݄࣮੷ͰେମίετΧοτͰ͖͍ͯΔɻ

    View full-size slide

  14. ্هͷΑ͏ʹLVCFMFU@FYUSB@BSHTͰεϙοτΠϯελϯεΛ࢖͏Α͏ʹઃఆͰ͖ΔɻUFSSBGPSN
    BXTFLTϦϙδτϦ಺ͷFYBNQMFʹྫ΋͋Δɻ
    IUUQTHJUIVCDPNUFSSBGPSNBXTNPEVMFTUFSSBGPSNBXTFLTUSFFNBTUFSFYBNQMFTTQPU@JOTUBODFT
    4QPU*OTUBODF

    View full-size slide

  15. εϙοτΠϯελϯε͸5FSNJOBUF͞ΕΔةݥ͕͋ΔҝɺͦΕ͕௨஌͞ΕΔλΠϛ
    ϯάͰ1PEͷୀආΛߦ͏ඞཁ͕͋Δɻ͹ͬͪΓΞϓϦέʔγϣϯΛӡ༻͢ΔͳΒ
    "84/PEF5FSNJOBUJPO)BOEMFS͸ೖΕ͓͖͍ͯͨɻ
    IUUQTHJUIVCDPNBXTBXTOPEFUFSNJOBUJPOIBOEMFS
    4QPU*OTUBODF

    View full-size slide

  16. ຊདྷ&MBTUJDTFBSDIΛཱͯΔ1PE͸ΦϯσϚϯυΠϯελϯε਺୆Ͱ৑௕Խͱ͍͖͍ͨͱ͜Ζͩ
    ͕ɺଥڠͯ͠εϙοτΠϯελϯεʹϚελʔϊʔυ୆POMZͰཱ͍ͯͯΔ μϝ
    ɻ
    ࠷ѱϒϩάͷσʔλ͸(JU)VCͱ࠶౓ಉظͤ͞Ε͹͍͍ɻϖʔδͰ(JU)VCͷهࣄҰཡʹҰԠ༠
    ಋ͍ͯ͠Δɻ
    4QPU*OTUBODF

    ࠷ۙɺఘΊͯΠϯελϯελΠϓͱϊʔυ਺Λ૿΍ͨ͠ͷͰɺ&MBTUJDTFBSDI΋৑௕Խ͍͖͍ͯͨ͠ɻ

    View full-size slide

  17. ΠϯελϯελΠϓผͷ1PEىಈՄೳ਺͸͜͜ͰܭࢉͰ͖Δɻ
    IUUQTEPDTBXTBNB[PODPNKB@KQ"84&$MBUFTU6TFS(VJEFVTJOHFOJIUNM
    ࠷খϊʔυΛ୳Δ

    UNFEJVNº/ ϊʔυ਺
    ͷ৔߹
    "º#º/
    /
    ºº

    " #
    &,4Ͱ৭ʑ΍Γ͍͕ͨɺϊʔυ਺͸࠷খݶʹ཈͍͑ͨɻখ͞ͳΠϯελϯελΠϓΛ࢖͏ͱଟ෼࠷ॳʹҾͬ
    ͔͔Δͷ͸1PEىಈՄೳ਺ɻࣗ෼͸UNFEJVNºͷߏ੒

    View full-size slide

  18. 1SPNFUIFVT(SBGBOBͰΫϥελͷϦιʔε؂ࢹ͸ίετΛ੾ΓͭΊΔͨΊʹ΋ඞཁ
    ࠷খߏ੒Ͱߦ͘ͳΒ؂ࢹ͓ͯ͘͠ͱ҆৺ ͨͩ͜Ε͚ͩͰ1PE਺Λফඅͯ͠͠·͏͕ɺɺ

    ࠷খϊʔυΛ୳Δ

    View full-size slide

  19. 1SJWBUF4VCOFU1VCMJD4VCOFUͰӡ༻͢Δ৔߹0$**NBHFΛ1VMM͢ΔͨΊʹ΋/"5͕ඞཁ
    Լهͷެࣜ2VJDL4UBSUͰ͸ԼهͷΑ͏ʹ/"5(BUFXBZΛར༻͍ͯ͠Δɻ
    IUUQTBXTBNB[PODPNKQRVJDLTUBSUBSDIJUFDUVSFBNB[POFLT
    /"5

    View full-size slide

  20. /"5(BUFXBZ͕஍ຯʹߴ͍ɻԼه͸͋Δ࣌఺Ͱͷ/"5(BUFXBZºͷྉۚɻಛʹI͸஍
    ຯʹࢗ͞Δɻ͜ΕΛ୆͸ݸਓ&,4ʹ͸ਏΈʜ
    /"5(BUFXBZ

    View full-size slide

  21. খ͞ͳΞϓϦέʔγϣϯͰ&$3͔Β*NBHF1VMMͰར༻͢Δ͚ͩͳΒ1SJWBUF-JOL΋͋ΓʂϓϥΠ
    ϕʔτωοτϫʔΫܦ༝ͰQVMMͰ͖Δɻͬͪ͜Λ࢖͏ͱίετ͕/"5(BUFXBZͷʹͳΔɻ
    1SJWBUF-JOL

    View full-size slide

  22. 1SJWBUF-JOL

    ᄁ͘ͱͨ·ʹΠέͯΔܑ͓͞Μୡ͕ॿ͚ͯ͘ΕΔͧ✨

    View full-size slide

  23. /"5*OTUBODF

    ݕূ࣌͸/"5*OTUBODFͰे෼ɻεϙοτΠϯελϯεͰ/"5*OTUBODF͕ҰܸͰཱͯΕΔͧ✌
    IUUQTSFHJTUSZUFSSBGPSNJPNPEVMFTJOUOBUJOTUBODFBXT

    View full-size slide

  24. /"5*OTUBODF

    ࣗ෼ͷϒϩά͸ίετͷҝʹ৑௕ԽΛଥڠͯ͠/"5*OTUBODFͰӡ༻͍ͯ͠Δɻ
    Πϯλʔωοτʹग़Δ༻ࣄ͕&$3͔͠ͳ͍ͳΒ͜ΕͰ΋͍͚ͪΌ͏ɻ

    View full-size slide

  25. 1VCMJD4VCOFUPOMZ
    ࣗ෼͸ษڧͷͨΊʹ1VCMJD1SJWBUF4VCOFUͰಈ͔͍ͯ͠Δ͕ɺ1VCMJD0OMZͳߏ੒ͳΒ΋͸
    ΍/"5͢Βෆཁɻ͞ΒʹίετΛ཈͍͑ͨͳΒͪ͜ΒͰ΋͍͚Δɻ

    View full-size slide


  26. ࢦఆͤͣʹΠϯελϯεΛ࡞ΔͱσϑΥϧτͷαΠζׂ͕Γ౰ͯΒΕΔɻݕূ΍ͦ΋ͦ΋
    ϘϦϡʔϜαΠζ͕ͦ͜·Ͱඞཁͳ͍ͳΒɺׂΓ౰ͯΕΔ࠷খαΠζʹ͓ͯ͘͠ͱίετΛ཈͑
    ΕΔɻ5FSSBGPSNͷXPSLFS@HSPVQTͰઃఆͰ͖Δɻ

    View full-size slide

  27. ͦͷଞ
    ίετ؂ࢹ͸͓ͯ͜͠͏ɻؾ͔ͮͳ͍͏ͪʹBVUPTDBMFSָ͕͘͠๫ΕΔ͔΋Αʁ

    View full-size slide

  28. ॳ৺ऀͰ&,4ͳͲͷϚωʔδυLTΛ࢖ͬͯษڧ͍ͨ͠৔߹
    ͸ҙࣝ͠ͳ͍ͱ͜ΖͰແବͳίετ͕͔͔͍ͬͯΔɻ
    εϙοτΠϯελϯεͷར༻
    &$ͷϦιʔε͸ద੾ʹ࢖͑ͯΔʁ
    /"5ߏ੒͸࠷దʁ
    αΠζ͸ద੾ʁ
    ίετΛ཈ָ͍͑ͯ͠LTϥΠϑΛ

    View full-size slide

  29. 3FGFSFODF
    αΠζ͸ద੾ʁ&,4ೖ໳ऀ޲͚ʹʮࠓͦ͜ৼΓฦΔ&,4ͷجૅʯͱ͍͏λΠτϧͰొஃ͠·ͨ͠
    &,4͕ͲͷΑ͏ʹ"84ϦιʔεΛར༻͍ͯ͠Δ͔Λ஌ΔҰาʹ

    IUUQTEFWDMBTTNFUIPEKQBSUJDMFTFLT@CBTJD
    &,4ར༻࣌ʹ஫ҙ͢΂͖ϙΠϯτ
    ΠϯελϯελΠϓͱ1PEར༻Մೳ਺ʹ͍ͭͯͳͲ

    IUUQTRJJUBDPNQBQFSJUFNTFGBDFDD
    "84&$3ͷ1SJWBUF-JOLΛ࡞Δ
    &,4͔Β1SJWBUF-JOLͰ&$3͔ΒQVMM͢Δํ๏ͳͲ

    IUUQTXXXLFOOZTUFDIBXTDSFBUFFDSQSJWBUFMJOL

    View full-size slide