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

「全然わからない。俺たちは雰囲気でコンテナをやっている」 /operating-contain...

KONDO Uchio
February 17, 2018

「全然わからない。俺たちは雰囲気でコンテナをやっている」 /operating-containers-just-with-a-hunch

Hacker Tackle 2018 発表資料

KONDO Uchio

February 17, 2018
Tweet

More Decks by KONDO Uchio

Other Decks in Technology

Transcript

  1. %PDLFSΛྫʹ͠·͢ wී௨ͷ-JOVY 6CVOUV#JPOJD ʹ%PDLFSΛೖΕͯɺෳ਺ݸίϯςφΛ ࡞ͬͯΈΔɻ $ docker run --rm -d

    debian:latest /bin/sleep 99 d003ac5389a1631d789f5d1b77bf201adc517ad9acc91bd5...
  2. ࢼͯ͠Έ·͠ΐ͏ w˞ࣦഊ͢Δͱɺ฼؋͝ͱམͪ·͢ term1:~$ echo $$ #=> 5849 term2:~$ echo 5849

    | \ sudo tee /sys/fs/cgroup/pids/hackertackle/tasks term1:~$ cat /proc/self/cgroup | grep pids 3:pids:/hackertackle term1:~$ #... doing fork bomb ...
  3. ίϯςφ༻ޠ %PDLFS -9$ -9% .PCZ ,VCFSOFUFT 'MBOOFM SVOD (,& &$4

    "$* 0$* 5FDUPOJD $PSF04 )BDPOJXB SLU SBJMDBS $BMJDP /PNBE 4XBSN
  4. ิॿઢΛҾ͜͏ SVOD %PDLFS -9$ -9% )BDPOJXB .PCZ SLU ,VCFSOFUFT 'MBOOFM

    $BMJDP 4XBSN /PNBE SBJMDBS $3*0 $POUBJOFSE 0$* 4QFD $3*
  5. ṖͷਤΛՃ޻ͯ͠࠶ܝ SVOD -9$ -9% )BDPOJXB .PCZ SLU ,VCFSOFUFT 'MBOOFM $BMJDP

    4XBSN /PNBE SBJMDBS $3*0 $POUBJOFSE 0$* 4QFD $3* ,FSOFMTZTDBMM
  6. ṖͷਤΛՃ޻ͯ͠࠶ܝ SVOD -9$ -9% )BDPOJXB .PCZ SLU ,VCFSOFUFT 'MBOOFM $BMJDP

    4XBSN /PNBE SBJMDBS $3*0 $POUBJOFSE 0$* 4QFD $3* ,FSOFMTZTDBMM ʮϥϯλΠϜʯͱ͍͏ݺͼํͰ͜ͷ྆ํͷൣғΛࢦ͍ͯ͠Δ
 ͷͰΊͪΌࠞཚ͢ΔɻͲͪΒͷ໾ׂ͔ҙࣝ͢Δͱ٢
  7. ṖͷਤΛՃ޻ͯ͠࠶ܝ SVOD -9$ -9% )BDPOJXB .PCZ SLU ,VCFSOFUFT 'MBOOFM $BMJDP

    4XBSN /PNBE SBJMDBS $3*0 $POUBJOFSE 0$* 4QFD $3* ,FSOFMTZTDBMM %PDLFS͸͜͜Λ ·ͱΊͯར༻͢ΔԿ͔
  8. ṖͷਤΛՃ޻ͯ͠࠶ܝ SVOD -9$ -9% )BDPOJXB .PCZ SLU ,VCFSOFUFT 'MBOOFM $BMJDP

    4XBSN /PNBE SBJMDBS $3*0 $POUBJOFSE ,FSOFMTZTDBMM -9$-9%ʹؔͯ͠͸ɺ0$*ͱ΋·ͨผ͕ͩɺ ͬ͘͟Γ-9$͕Χʔωϧ΍ΓͱΓɺ-9%͕)551"1*Λ୲౰ )BDPOJXB͸͜Ε͔Β)551 5$1 JOUFSGBDFΛ࡞Γ·͢
  9. ࠷ޙͷϨΠϠʔ෼͚ SVOD -9$ -9% )BDPOJXB .PCZ SLU ,VCFSOFUFT 'MBOOFM $BMJDP

    4XBSN /PNBE SBJMDBS $3*0 $POUBJOFSE 0$* 4QFD $3* ,FSOFMTZTDBMM
  10. qBOOFMͷྫ wqBOOFM͸WYMBO -PWFS- Λ࣮ݱ͢ΔσʔϞϯ wࣗ෼Ͱ૊ΜͰ΋͍͍͚Ͳɺ
 $/*ϓϥάΠϯ͕͋Δ $ kubectl apply -f

    kube-flannel.yml ʮqBOOFMΛ࢖ͬͯ-JOVYͰ࣮ݱ͢ΔWYMBOͷ͞ΘΓΛ஌Δʯ IUUQTRJJUBDPNVE[VSBJUFNTCEEBGBCEG
  11. ࣮૷ϕʔεͳϨΠϠΘ͚·ͱΊ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