Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kubernetes Handson Osaka
Search
stormcat24
January 31, 2019
Programming
5
540
Kubernetes Handson Osaka
Docker/Kubernetes 実践コンテナ開発入門 Japan Tour 2019 in Osaka
stormcat24
January 31, 2019
Tweet
Share
More Decks by stormcat24
See All by stormcat24
素早く賢く失敗するDeveloper Productivityの実現を目指して
stormcat24
4
4.6k
KubernetesのマニフェストをそれなりにCIしたい
stormcat24
4
1.2k
令和時代のSaaS開発
stormcat24
1
240
History in 5 years of CircleCI and CyberAgent
stormcat24
3
810
Kubernetes Handson
stormcat24
5
4.2k
DockerとKubernetesでアプリケーション開発にコンテナをフル活用!
stormcat24
0
290
Base Image Journey 2018
stormcat24
29
130k
kotlin-fest
stormcat24
13
17k
Kotlin/Native
stormcat24
0
950
Other Decks in Programming
See All in Programming
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.8k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
500
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
240
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
4
580
JavaでLチカしたい! / JJUG CCC 2024 Fall LT
nhayato
0
120
C++でシェーダを書く
fadis
6
3.9k
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
4
6k
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.1k
Better Code Design in PHP
afilina
PRO
0
110
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
310
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.7k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.5k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Producing Creativity
orderedlist
PRO
341
39k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
505
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
A better future with KSS
kneath
238
17k
Building Applications with DynamoDB
mza
90
6.1k
How to Ace a Technical Interview
jacobian
276
23k
Transcript
Kubernetes Handson - Docker/Kubernetes ࣮ફίϯςφ։ൃೖ Japan Tour 2019 in Osaka-
2019.01.30 - 01.31
XIPJT ‣ "LJOPSJ:BNBEB ‣ $ZCFS"HFOU ‣ '3&4)-*7& ‣ 0QFO4BB44UVEJP5FDI-FBE TUPSNDBU
εϥΠυͷݟग़͠ʹ ͕͍͍ͭͯΔͱ͜Ζ࣮ࡍʹ օ͞ΜʹखΛಈ͔ͯ͠Β͏ͱ͜ΖͰ͢
IUUQTHJUIVCDPNTUPSNDBULVCFSOFUFTIBOETPO ϩʔΧϧʹ$MPOF͓͍͍ͯͯͩ͘͠͞
ίϚϯυΛࣸܦ͢Δͷ͕ͭΒ͍ʂ ͱ͍͏ͦ͜ͷ͋ͳͨ
3&"%.&Λ͝ཡ͍ͩ͘͞
PVUMJOF ‣ NJOͳͥࠓ,VCFSOFUFTΛΔͷ͔ ‣ NJO-PDBMͰ͍͍ײ͡ͷ,VCFSOFUFT։ൃڥΛଗ͑Δ ‣ NJO,VCFSOFUFTͷجຊతͳϦιʔεɺΞϓϦέʔγϣϯͷσϓϩΠ ‣ NJOٳܜ ‣
NJO)FMNͰΞϓϦέʔγϣϯΛύοέʔδϯά͢Δ ‣ NJOTLBGGPMEͰ͍͍ײ͡ʹ։ൃΛճͯ͠ΈΔ ‣ NJOͦͷଞϢʔεέʔεɺศརπʔϧհ ‣ Γ༧උ࣌ؒɾ࣭ٙλΠϜ
ͳͥࠓ,VCFSOFUFTΛΔͷ͔
"ίϯςφΦʔέετϨʔγϣϯͷσϑΝΫτ͔ͩΒ σϑΝΫτΛબͿͷେࣄ ৫ʹ͓͚Δϊϋͷू
"Φʔϓϯιʔε͔ͩΒ ϗϫΠτϘοΫε ׆ൃͳ։ൃίϛϡχςΟ ๛ͳΤίγεςϜ ߴ͍֦ுੑ
"Ϛωʔδυͷॆ࣮ (PPHMF,VCFSOFUFT&OHJOF (,& "NB[PO&MBTUJD$POUBJOFS4FSWJDFGPS,VCFSOFUFT &,4 "[VSF,VCFSOFUFT4FSWJDF ",4
σϑΝΫτͰ͋Δ͕ ֶशͷෑډΛ͘ແ͍ ࣗ༝ͷߴ͞ނͷ֓೦ͷଟ͞ มԽͷૣ͍ྖҬނͷֶशͷ͠͞FUD
%PDLFS,VCFSOFUFT ࣮ફίϯςφ։ൃೖ ٕज़ධࣾʣ େώοτޚྱ ઈࢍൃചத
ࠓ͜ͷຊΛϕʔεʹ ࠷Ͱ,VCFSOFUFTΛ׆༻ͨ͠ ։ൃΠϝʔδΛ௫ΜͰΒ͍ɺ ͔ͭ࠷ۙͷτϨϯυͷѲ·ͰΛࢦ͠·͢
-PDBMͰ͍͍ײ͡ͷ ,VCFSOFUFT։ൃڥΛଗ͑Δ
%PDLFS%FTLUPQ ‣ %PDLFSGPS8JOEPXT.BDͷ͜ͱ ‣ ࠷ۙ%PDLFS%FTLUPQͱݺͿΒ͍͠ ‣ μϯϩʔυʹ%PDLFS4UPSFͷϩάΠϯඞཁ ‣ ͔Β,VCFSOFUFT࿈ܞ͕4UBCMFʹ
ઃఆը໘Λ։͘
$16ɺϝϞϦׂΓͯ֬ೝ
,VCFSOFUFTઃఆ
,VCFSOFUFTJTTUBSUJOH
,VCFSOFUFTJTSVOOJOH
LVCFDUM ‣ ͘͠ʔͯ͌ʔ͑Δ ‣ ,VCFSOF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ΛͬͯϩάΠϯ
%BTICPBSEදࣔ
,VCFSOFUFTͷجຊతͳϦιʔε ΞϓϦέʔγϣϯͷσϓϩΠ
,VCFSOFUFTͷ جຊ֓೦ɹ
ίϯςφΦʔέετϨʔγϣϯπʔϧͷҰͭ
ΦʔέετϨʔγϣϯͷ౷͢Δ.BTUFS
,VCFSOFUFTͰ ίϯςφΦʔέετϨʔγϣϯٕज़Λ࣮ݱ͢ΔͨΊͷ ༷ʑͳϦιʔεʢ෦ʣΛΈ߹Θͤͯ ΞϓϦέʔγϣϯΛ࣮ߦ͢Δ
,VCFSOFUFTͷϦιʔε %FQMPZNFOU /BNFTQBDF 4FSWJDF *OHSFTT $POGJH.BQ %BFNPO4FU 4UBUFGVM4FU +PC 1PE
3FQMJDB4FU +PC $SPO+PC ˞΄ΜͷҰ෦Ͱ͢
1PE
1PE ‣ ίϯςφͷू߹ମͷ୯ҐͰɺগͳ͘ͱͭͷίϯςφΛ࣋ͭ ‣ ίϯςφಉ͕࢜ີ݁߹Ͱ͋Δํ͕߹͕ྑ͍߹ɺ1PEͱͯ͠ ෳछίϯςφΛ·ͱΊͯσϓϩΠ͢Δ ‣ ,VCFSOFUFTͰίϯςφ୯ҐͰͳ͘ɺ1PE୯ҐͰσϓϩΠ͞ ΕΔ
1PEͷஔΠϝʔδ
/PEFލ͗/(
1PEΛ࡞ ‣ OHJOYͱFDIPΛฦ͢ΞϓϦέʔγϣϯ͔ΒΔ1PE ‣ LVCFSOFUFTIBOETPOSFTPVSDFTJNQMFFDIPZBNM ‣ ϚχϑΣετϑΝΠϧͱݺΕΔ,VCFSOFUFTͷϦιʔεఆٛΛLVCFDUMͰ ద༻͢Δ͜ͱͰɺϦιʔεͷ࡞ɾमਖ਼Λߦ͏
1PEͷϚχϑΣετϑΝΠϧ BQJ7FSTJPOW LJOE1PE NFUBEBUB OBNFTJNQMFFDIP TQFD DPOUBJOFST OBNFOHJOY JNBHFHJIZPEPDLFSOHJOYQSPYZMBUFTU FOW
OBNF#"$,&/%@)045 WBMVFMPDBMIPTU QPSUT DPOUBJOFS1PSU OBNFFDIP JNBHFHJIZPEPDLFSFDIPMBUFTU QPSUT DPOUBJOFS1PSU
1PEΛ࡞ 1PEͷ࡞ LVCFDUMBQQMZGSFTPVSDFTJNQMFFDIPZBNM QPETJNQMFFDIPDSFBUFE ࡞ͨ͠1PEͷ֬ೝ LVCFDUMHFUQPE /".&3&"%:45"5643&45"354"(& TJNQMFFDIP3VOOJOHN
1PEͷૢ࡞ FDIPίϯςφͷϩάʢඪ४ग़ྗʣͷ֬ೝ LVCFDUMMPHTGTJNQMFFDIPDFDIP TUBSUTFSWFS OHJOYίϯςφʹ44)ϩάΠϯͬΆ͍͜ͱΛ͢ΔʢTIͷ࣮ߦʣ LVCFDUMFYFDJUTJNQMFFDIPTIDOHJOY QMFBTFJOQVU 1PEΛআ
LVCFDUMEFMFUFQPETJNQMFFDIP QPETJNQMFFDIPEFMFUFE ϑΝΠϧΛͬͯআՄೳ LVCFDUMEFMFUFGSFTPVSDFTJNQMFFDIPZBNM QPETJNQMFFDIPEFMFUFE
1PEͰͷଞͷίϯςφͷࢀর ,VCFSOFUFTͰ1PEʹ*1ΞυϨε͕ৼΒΕΔʢ$MVTUFS*1ʣ 1PE͕ࣗͭͷԾϚγϯͷΑ͏ͳͷ FDIPίϯςφͷϙʔτɺ OHJOY͔ΒMPDBMIPTUͱݟ͑Δ
3FQMJDBTUͱ%FQMPZNFOU
3FQMJDB4FU ‣ 1PE໊ΫϥελͰϢχʔΫɻಉ໊ͷ1PE࡞Ͱ͖ͳ͍ ‣ TJNQMFFDIPΛෳ͢Δ߹ɺTJNQMFFDIPͷΑ͏ͳ໊લͰ࡞ ͠ͳ͍ͱ͍͚ͳ͍ ‣ ࡞Γ͍͚ͨͩͷ1PEͷϚχϑΣετΛ༻ҙ͢Δͷ໘ 1PEͷෳΛαϙʔτ͢Δ3FQMJDB4FUΛ͏
3FQMJDB4FUͷϚχϑΣετϑΝΠϧ BQJ7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͠Δ*OHSFTTʹରͯ͠ϦΫΤετΛૹΔɹ DVSMIUUQMPDBMIPTU))PTUFDIPHJIZPMPDBM
*OHSFTTͱ&YUFSOBM%/4 ‣ ύϒϦοΫΫϥυ্Ͱ&YUFSOBM%/4ͱ࿈ܞ͢Δ͜ͱͰɺ(PPHMF $MPVE%/4"843PVUFʹࣗಈͰ%/4ϨίʔυΛՃͰ͖Δ ‣ IUUQTHJUIVCDPNLVCFSOFUFTJODVCBUPSFYUFSOBMEOT
8FCΞϓϦέʔγϣϯͷجຊతͳྲྀΕ ‣ ΞϓϦέʔγϣϯΛίϯςφԽ͢Δ ‣ %FQMPZNFOUΛͭ͘Δ ‣ ΞϓϦέʔγϣϯͷڍಈڥมͰ ‣ ඞཁʹԠͯ͡$POGJH.BQ ‣
4FSWJDFΛͭ͘Δ ‣ *OHSFTTΛͭ͘Δ
ʢࢀߟʣ࣮ફతͳ8FCΞϓϦέʔγϣϯͷߏ
ٳܜ LVCFDUMEFMFUFGSFTPVSDFTJNQMFFDIPJOHSFTTZBNM LVCFDUMEFMFUFGSFTPVSDFTJNQMFFDIPTFSWJDFZBNM LVCFDUMEFMFUFGSFTPVSDFTJNQMFFDIPEFQMPZNFOUTVNNFSZBNM LVCFDUMEFMFUFGSFTPVSDFTJNQMFFDIPEFQMPZNFOUTQSJOHZBNM ٳܜऴΘΔ·ͰʹϦιʔεফ͓͍͍ͯͯͩ͘͠͞
)FMNͰΞϓϦέʔγϣϯΛ ύοέʔδϯά͢Δ
8FCΞϓϦʹඞཁͳϦιʔε %FQMPZNFOU *OHSFTT 4FSWJDF 4FSWJDFͷΫϥελ֎ͷެ։ 1PEͷϧʔςΟϯάɺαʔϏεσΟεΧόϦ 3FQMJDB4FUੈཧɺ1PEͷੜ 3FQMJDB4FU 1PE
͜Ε͚ͩͷϚχϑΣετϑΝΠϧ͕ඞཁ JOHSFTTZBNM TFSWJDFZBNM EFQMPZNFOUZBNM
͠ෳڥ͋Δ߹ʁ EFQMPZNF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45"564$)"35"117&34*0/ /".&41"$& SFENJOF.PO%FD%&1-0:&%SFENJOF EFGBVMU IPTUTͰ*OHSFTTʹઃఆͨ͠υϝΠϯΛՃ IFMNEFMQVSHFSFENJOF SFMFBTFSFENJOFEFMFUFE
ΧελϜ$IBSU
ΧελϜ$IBSUͷ࡞ ‣ IFMNDSFBUFDIBSU໊Ͱ$IBSUͷςϯϓϨʔτΛ࡞Ͱ͖Δ ‣ EFQMPZNFOUZBNM TFSWJDFZBNM JOHSFTTZBNMσϑΥϧτͰ༻ҙ͞Εͯ Δ ‣ σϑΥϧτWBMVFϑΝΠϧσϑΥϧτͰ࡞͞ΕΔ
‣ TJNQMFFDIPͷ$IBSUΛ༻ҙͨ͠ ‣ LVCFSOFUFTIBOETPOIFMNTJNQMFFDIP
WBMVFTZBNMΛ্ॻ͖ͯ͠ΈΑ͏ ‣ ՝ɿ1PEΛͭىಈͯ͠ΈΔ ‣ ՝ɿ*OHSFTTΛ༗ޮʹ͠ɺదͳυϝΠϯΛͯͯΈΔɹ IFMNJOTUBMMG্ॻ͖༻ͷZBNMͷύεOBNFϦϦʔε໊IFMNTJNQMFFDIP
ղ SFQMJDB$PVOU JOHSFTT FOBCMFEUSVF QBUIT IPTUT IPHFIBOETPOMPDBM IFMNJOTUBMMGIPHFZBNMOBNFIPHFIFMNTJNQMFFDIP
)FMNίπ ‣ TUBCMFʹ͋Δ$IBSUσϑΥϧτWBMVFϑΝΠϧΛݟΕɺΧελϚΠζͷϙΠϯ τ͕Θ͔Δ ‣ ಈ͖Λਂ۷Γ͚ͨΕςϯϓϨʔτݟΔ ‣ ͓٬༷͕ඞཁͳιϑτΣΞ͍͍ͨͯ4UBCMFʹ͋Γ·͢Αʁ ‣ ,VCFSOFUFT্ʹ)FMNΛͬͯߏங͢ΔͱָͰ͢Ͷ
‣ ΧελϜ$IBSUςϯϓϨʔτʹཔΔ ‣ ϙʔλϏϦςΟΛߴΊΔͨΊʹɺςϯϓϨʔτύϥϝʔλͷຒΊࠐΈɺσϑΥ ϧτWBMVFΛඋ͢Δ ‣ IFMNMJOU׆༻͠Α͏
TLBGGPMEͰ͍͍ײ͡ʹ ։ൃΛճͯ͠ΈΔ
,VCFSOFUFTͷ։ൃΛճ͢جຊϑϩʔ ‣ ίʔυΛॻ͘ ‣ %PDLFSΠϝʔδϏϧυ ‣ $*·Θ͢PSϩʔΧϧϏϧυ ‣ %FQMPZNFOUߋ৽ ‣
৽͍͠1PEʹϩʔϦϯάΞοϓσʔτ ͦͦ͜͜μϧ͍ τϥΠΞϯυΤϥʔ͕໘ɹ
ίʔυΛͨ͠Β 1PE͕࠶σϓϩΠ͞Εͯ΄͍͠
4LBGGPMEͱ ‣ IUUQTHJUIVCDPN(PPHMF$POUBJOFS5PPMTTLBGGPME ‣ CSFXJOTUBMMTLBGGPME ‣ (PPHMFۘ ‣ ,VCFSOFUFTΞϓϦέʔγϣϯͷϏϧυɾσϓϩΠͱ͍ͬͨ܁Γฦ͠ߦΘ ΕΔجຊϫʔΫϑϩʔΛαϙʔτ͢ΔͨΊͷπʔϧ
‣ ,VTUPNJ[F )FMN #B[FM +JC %PDLFS$PNQPTFͱ࿈ܞՄೳ
ଟ͘ͷϢʔεέʔεʹରԠʂ *OHSFTT༗ޮԽ ࠓճ,VTUPNJ[FΛࢼ͠·͢
,VTUPNJ[F ‣ ϚχϑΣετϑΝΠϧΛύοέʔδϯά͢ΔͨΊͷπʔϧ ‣ )FMNͱͷҧ͍ɹ ‣ )FMNΫϥελʹ5JMMFS͕ඞཁͰɺIFMNίϚϯυΛͬͯσϓϩΠ͢Δ ‣ ,VTUPNJ[FɺϚχϑΣετϑΝΠϧ܈ͷܗΛ࡞Δ͜ͱ͚͕ͩతɻσϓϩ ΠLVCFDUMBQQMZΛͬͯߦ͏
‣ LVCFDUMʹऔΓࠐ·ΕΔʢ༧ఆͩͬͨʣ ‣ ݄ʹϚʔδ ‣ ݄ʹSFWFSU͞ΕΔ͆͆͆ ‣ LVCFDUMʹೖΕΔͷͪΐͬͱҧ͏ΑͶ
TLBGGPMELVTUPNJ[FLVTUPNJ[BUJPOZBNM ‣ ϚχϑΣετ܈ΛͲͷΑ͏ʹߏ͠ɺύοέʔδ͢Δ͔Λఆٛ͢ΔϑΝΠ ϧ ‣ ؆୯ʹݴ͏ͱɺϚχϑΣετΛ্ॻ͖ͯ͠ɺผͷϚχϑΣετΛ࡞Δ ‣ %FQMPZNFOU 4FSWJDF *OHSFTTΛ·ͱΊͨͭͷϑΝΠϧΛ࡞ΓɺLVCFDUM
ʹ৯ΘͤΔ SFTPVSDFT EFQMPZNFOUZBNM QBUDIFT QBUDIZBNM
TLBGGPMELVTUPNJ[FEFQMPZNFOUZBNM BQJ7FSTJPOBQQTW LJOE%FQMPZNFOU NFUBEBUB OBNFLVTUPNJ[FUFTU MBCFMT BQQLVTUPNJ[FUFTU TQFD SFQMJDBT TFMFDUPS
NBUDI-BCFMT BQQLVTUPNJ[FUFTU UFNQMBUF NFUBEBUB MBCFMT BQQLVTUPNJ[FUFTU TQFD DPOUBJOFST OBNFLVTUPNJ[FUFTU JNBHFHDSJPLTTLB⒎PMEOPUBWBMJEJNBHF ˞IFMNͱҧ͍ɺςϯϓϨʔτͰͳ͍ ଘࡏ͠ͳ͍దͳΠϝʔδΛࢦఆ
TLBGGPMELVTUPNJ[FQBUDIZBNM BQJ7FSTJPOBQQTW LJOE%FQMPZNFOU NFUBEBUB OBNFLVTUPNJ[FUFTU TQFD UFNQMBUF TQFD DPOUBJOFST OBNFLVTUPNJ[FUFTU
JNBHFJOEFYEPDLFSJPMJCSBSZCVTZCPY DPNNBOE TMFFQ ˞ͭલͷEFQMPZNFOUZBNMΛ্ॻ͖͢ΔͨΊͷϚχϑΣετ ͜ͷϑΝΠϧࣗମϚχϑΣετϑΝΠϧͱཱͯ͠ ͜͜ͷ༰Ͱ্ॻ͖͞ΕΔɹ
LVTUPNJ[FͰϚχϑΣετ࡞ ϚχϑΣετϑΝΠϧΛߏங LVTUPNJ[FCVJMET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ӡ༻ͰSFQMJDB$PVOUͰͳ͘ɺ)1"Λઃఆ͢Δ ‣ $16.FNPSZ༻ͷᮢʹΑͬͯɺ1PE૿ݮͷΠϕϯτ͕ൃੜ
)1"ͷϚχϑΣετ apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: name: echo spec: scaleTargetRef:
apiVersion: apps/v1 kind: Deployment name: echo minReplicas: 1 maxReplicas: 3 metrics: - type: Resource resource: name: cpu targetAverageUtilization: 40
ϊʔυ͕Γͳ͍߹Ͳ͏͢Δʁ ,VCFSOFUFT"VUPTDBMFS
,VCFSOFUFT"VUPTDBMFS ‣ IUUQTHJUIVCDPNLVCFSOFUFTBVUPTDBMFS ‣ ඞཁͳͷ1PEΛஔͰ͖Δ͚ͩͷϚγϯϦιʔε͕ແ͍߹ʹɺϊʔυ Λ૿͢Έ ‣ ϚωʔδυͰجຊతʹඪ४ରԠ ‣ ඇϚωʔδυͰ)FMNͰೖΕ·͠ΐ͏
‣ IFMNJOTUBMMOBNFTQBDFLVCFTZTUFNOBNFDMVTUFSBVUPTDBMFS TUBCMFDMVTUFSBVUPTDBMFS ‣ "84ͩͱ"VUP4DBMJOH(SPVQͷ3BUF-JNJUى͘͜͢͠ͳΔͷͰҙ
TUFSO ‣ ίϚϯυϥΠϯͰ1PEͷϩάΛUBJMͰ͖Δπʔϧ ‣ IUUQTHJUIVCDPNXFSDLFSTUFSO ‣ ϥϕϧʹҰகͨ͠1PEͷϩάΛӾཡͰ͖Δ
LBOJLP ‣ ,VCFSOFUFTΫϥελͰ%PDLFSΠϝʔδΛϏϧυ͢ΔͨΊͷπʔϧ ‣ IUUQTHJUIVCDPN(PPHMF$POUBJOFS5PPMTLBOJLP ‣ %PDLFS%BFNPOແ͠ͰϏϧυͰ͖Δ
ͦͷଞࡉ͔͍ͷ ‣ LVCFDUY ‣ IUUQTHJUIVCDPNBINFUCLVCFDUY ‣ ૢ࡞ରͷΫϥελΛΓସ͑͘͢͢Δπʔϧ ‣ LVCFQSPNQU ‣
IUUQTHJUIVCDPNDCBUBLVCFQSPNQU ‣ ΦʔτίϯϓϦʔτͰ͖ΔLVCFDUMతͳ
༧උ࣌ؒɾ࣭ٙλΠϜ