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
Persistent Volumeのはじめの一歩
Search
Yukinori Sakashita
October 27, 2020
Technology
2
930
Persistent Volumeのはじめの一歩
Kubernetes Novice Tokyo #6で発表したスライドです。
https://k8s-novice-jp.connpass.com/event/191555/
Yukinori Sakashita
October 27, 2020
Tweet
Share
More Decks by Yukinori Sakashita
See All by Yukinori Sakashita
ゼットラボにおける一歩進んだ Kubernetes向けストレージ管理方法
ysakashita
0
190
Kubernetes Persistent Volume向け ゾーン障害への備え
ysakashita
0
1.5k
はじめよう Kubernetes PersistentVolume のバックアップ
ysakashita
3
1k
2022年コンテナ/Kubernetes向けストレージ技術の最新動向
ysakashita
9
5.1k
Cloud Nativeに向けた考えるべきポイント
ysakashita
1
240
ステートフルアプリ on Kubernetesの現在と今後の展望
ysakashita
2
720
VM時代からコンテナ時代へストレージ管理の移り変わり
ysakashita
9
7.4k
Kubernetes時代のストレージ
ysakashita
1
600
PersistentVolumeの一歩進んだ使い方
ysakashita
3
1.6k
Other Decks in Technology
See All in Technology
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
220
Terraform Stacks入門 #HashiTalks
msato
0
360
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
2
230
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
220
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
強いチームと開発生産性
onk
PRO
35
11k
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
1
230
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A Tale of Four Properties
chriscoyier
156
23k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Site-Speed That Sticks
csswizardry
0
31
A Modern Web Designer's Workflow
chriscoyier
693
190k
Designing Experiences People Love
moore
138
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Speed Design
sergeychernyshev
25
620
Typedesign – Prime Four
hannesfritz
40
2.4k
Transcript
1FSTJTUFOU7PMVNFͷ ͡ΊͷҰา :VLJOPSJ4BLBTIJUB
ࣗݾհ ‣ٕज़ݚڀΤϦΞ ӡ༻ཧٕज़ Ϋϥυ αʔόετϨʔδ ࣗಈࣗίϯϐϡʔςΟϯά
"*.- // ).. #BZFTJBO/FUXPSL ‣৬ྺ ཱ࡞ॴ 㾎தԝݚڀॴԣݚڀॴ ओݚڀһ 㾎ւ֎ݚڀॴ!γϦίϯόϨʔ ϥϘ αʔόϕϯμʔ ςΫχΧϧ4& 2 ࡔԼಙ ത࢜ :VLJOPSJ4BLBTIJUB 1I% ‣ ϠϑʔגࣜձࣾθοτϥϘגࣜձࣾ ‣ 4/*"ຊࢧ෦ٕज़ҕһձ෭ҕһ ‣ 4/*" 64 5FDIOJDBM$PVODJM"EWJTPS
"HFOEB σʔλͷӬଓԽ ,VCFSOFUFTʹ͓͚ΔετϨʔδϞσϧͱಈ͖ 17$17Λศར͔ͭ҆શʹ͏4UBUFGVM4FU 3
σʔλͷӬଓԽ
1FSTJTUFOUͱ ‣ &QIFNFSBM ͔ͳ͍ɺ໋ 1PEͷআ࠶σϓϩΠͱಉ࣌ʹσʔλ͕ফ͑Δ FNQUZ%JS XSJUBCMFMBZFSTFUD
‣ 1FSTJTUFOU ࣋ଓతɺӬଓੑ 1PE͕আ࠶σϓϩΠ͞Εͯσʔλফ͑ͳ͍ 1FSTJTUFOU7PMVNF 17 5 bin/lib Container App Logic Data
&QIFNFSBM 1FSTJTUFOU -PDBM 1FSTJTUFOU &YUFSOBM σʔλͷอଘॴ োੑ 1PEআͰσʔλআ ϊʔυ ͘͠σΟεΫ
আͰ σʔλআ ετϨʔδ ͘͠7PMVNF আ Ͱσʔλআ දతͳ ,4ͷϦιʔε FNQUZ%JS 17$17 -PDBM IPTU1BUI 17$17 σʔλͷอଘॴ $POUBJOFS 4UPSBHF $POUBJOFS $POUBJOFS $POUBJOFS PS XSJUBCMF MBZFS FNQUZ%JS
#MPDL4UPSBHF 'JMF4UPSBHF 0CKFDU4UPSBHF ΞʔΩςΫνϟ ಛ wଂυϥΠϒͱಉ͡3BXσόΠε wϑΝΠϧγεςϜࣗ༝ʹબ wωοτϫʔΫυϥΠϒ wϑΝΠϧγεςϜετϨʔδ ͤɺมߋෆՄ
wΦϒδΣΫτ୯ҐͰΞΫηε wϑΝΠϧγεςϜʹґଘ͠ͳ͍ ͨΊɺେྔσʔλΛ֨ೲՄೳ σʔλసૹϓϩτίϧ J4$4* /7.FP' /'4 4.# )5514 )551 Ϛϯτύεͷྫ EFWTEB aaaTIBSFaIPHF IUUQTBBBPSHTUPSBHFIPHF ੑೳ )JHI .JEEMF -PX ओͳ༻్ %# 04 #PPU%JTL ϑΝΠϧͷڞ༗ ࣸਅɺಈը֨ೲ ετϨʔδछผ J4$4* /"44FSWFS /'4 4.# ,74 )55144FSWFS )5514 )PTU )PTU )PTU ҰൠతͳͰ͋ΓʹΑΓมΘΓ·͢ 4$4* 4$4*
#MPDL4UPSBHF 'JMF4UPSBHF 0CKFDU4UPSBHF ΞʔΩςΫνϟ ಛ wଂυϥΠϒͱಉ͡3BXσόΠε wϑΝΠϧγεςϜࣗ༝ʹબ wωοτϫʔΫυϥΠϒ wϑΝΠϧγεςϜετϨʔδ ͤɺมߋෆՄ
wΦϒδΣΫτ୯ҐͰΞΫηε wϑΝΠϧγεςϜʹґଘ͠ͳ͍ ͨΊɺେྔσʔλΛ֨ೲՄೳ σʔλసૹϓϩτίϧ J4$4* /7.FP' /'4 4.# )5514 )551 Ϛϯτύεͷྫ EFWTEB aaaTIBSFaIPHF IUUQTBBBPSHTUPSBHFIPHF ੑೳ )JHI .JEEMF -PX ओͳ༻్ %# 04 #PPU%JTL ϑΝΠϧͷڞ༗ ࣸਅɺಈը֨ೲ ετϨʔδछผ J4$4* /"44FSWFS /'4 4.# ,74 )55144FSWFS )5514 )PTU )PTU )PTU ҰൠతͳͰ͋ΓʹΑΓมΘΓ·͢ 4$4* 4$4* ,VCFSOFUFTͷ17$17ͷλʔήοτ কདྷαϙʔτͷ Մೳੑ͋Γ˞ ˞,&1IUUQTHJUIVCDPNLVCFSOFUFTFOIBODFNFOUTJTTVFT $04*IUUQTHJUIVCDPNLVCFSOFUFTTJHTDPOUBJOFSPCKFDUTUPSBHFJOUFSGBDFTQFD
σʔλՁͱಛੑͱอଘॴ ‣ σʔλͷՁΞϓϦͷಛੑʹԠͯ͡ɺͲ͜ʹอଘ͢Δͷ͔ΛܾΊΔͷ͕ϕλʔ ՁϏδωεఏڙαʔϏεͷॏཁͰܾ·Δ͜ͱ͕ଟ͍ ಛੑσʔλʹΞΫηε͢ΔΞϓϦϢʔεέʔεͰܾ·Δ͜ͱ͕ଟ͍ ཁٻੑೳ 3FBE8SJUFͷൺ 3%#/'4͕ඇਪ͕ଟ͍
3%# .2 /P42- 'JMF ސ٬ใ ։ൃɾ ӡ༻ʹඞཁ ࠶ੜՄೳͳσʔλ Ұ࣌తͳσʔλ &QIFNFSBM 1FSTJTUFOU -PDBM 1FSTJTUFOU #ࣾ'JMF Ձ ಛੑ อଘॴ 1FSTJTUFOU "ࣾ#MPDL 1FSTJTUFOU $ࣾ0CKFDU
ΞϓϥΠΞϯεͱ4%4 ‣ ΞϓϥΠΞϯεετϨʔδͱ4%4ΞʔΩ্ੑೳಛੑ͕ҧ͏ ‣ ετϨʔδ%JTL*0ʹؔͯ͠ͲͪΒࢄΞʔΩςΫνϟ ‣ 4%4εϞʔϧελʔτ͕༰қɻͨͩ͠ɺେنԽʹ͍ωοτϫʔΫ͕ϘτϧωοΫʹͳΓқ͍ ‣ σʔλͷՁɾಛੑʹԠͯ͡બ͖͢ ࢄΞϓϦ͕4%4ʹ͍͍ͯΔͱ͍͏୯७ͳΘ͚Ͱແ͍
$POUSPMMFS $IBTTJT .FNPSZ %BUB /PEF .FNPSZ %BUB /PEF .FNPSZ %BUB /PEF .FNPSZ %BUB /PEF .FNPSZ %BUB /PEF .FNPSZ .FUB%BUB /PEF .FNPSZ %# )PTU )PTU " " " "` "`` " ΞϓϥΠΞϯε ετϨʔδ 4%4 " " " "
,VCFSOFUFTʹ͓͚Δ ετϨʔδϞσϧͱಈ͖
ετϨʔδͷϞσϧ ‣ ϕϯμʔχϡʔτϥϧͳϞσϧ 1FSTJTUFOU7PMVNF$MBJN 1FSTJTUFOU7PMVNF 4UPSBHF$MBTT ‣
ཧऀͱϢʔβͷׂΛߟྀͨ͠Ϟσϧ ‣ ετϨʔδஔͷૢ࡞ͳ͠Ͱ7PMVNFΛ ίϯςφʹࣗಈͰϚϯτ ‣ ओʹϒϩοΫετϨʔδϑΝΠϧ ετϨʔδ͕ର 12 Ϣʔβ ཧऀ
ετϨʔδϦιʔεͷൣғͱݖݶ ‣ 4UPSBHF$MBTT 1FSTJTUFOU7PMVNFશͯͷ/BNFTQBDFͰڞ௨ͷϦιʔε Ϋϥελશମͷཧऀݖݶ͕ඞཁ $MVTUFS3PMFͱόΠϯσΟϯά͞ΕͨΞΧϯτ ‣ 1FSTJTUFOU7PMVNF$MBJN/BNFTQBDF͝ͱͷϦιʔε
/BNFTQBDFEΦϒδΣΫτͷಡΈॻ͖ͷݖݶ͕ඞཁ 3PMFͱόΠϯσΟϯά͞ΕͨΞΧϯτ 13 LVCFDUMBQJSFTPVSDFT /".&4)035/".&4"1*(3061/".&41"$&%,*/% QFSTJTUFOUWPMVNFDMBJNTQWDUSVF1FSTJTUFOU7PMVNF$MBJN QFSTJTUFOUWPMVNFTQWGBMTF1FSTJTUFOU7PMVNF TUPSBHFDMBTTFTTDTUPSBHFLTJPGBMTF4UPSBHF$MBTT
1FSTJTUFOU7PMVNF$MBJN QWD ‣ 7PMVNFͷཁٻ༷Λද͢Ϧιʔε 4UPSBHFUZQF 4UPSBHF$MBTT໊ 7PMVNFTJ[F
"DDFTTNPEF 14
ϩοΫϝΧχζϜͷҧ͍ ‣ ϒϩοΫετϨʔδ -#" ཧϒϩοΫΞυϨογϯά ͷΞΫηε ͷͨΊɺϩοΫϝΧχζϜΛ͍࣋ͬͯͳ͍ ͷϗετ͔ΒͷΈ8SJUFͱͳΔΑ͏ʹ
Ϛϯτ͢Δඞཁ͋Γ ‣ ϑΝΠϧετϨʔδ ϑΝΠϧ୯ҐͰͷϩοΫϝΧχζϜ͋Γ 0QFO࣌ʹऔಘͨ͠ϩοΫΛଞϗετʹൖ ෳͷϗετ͔Β3FBE8SJUF͕Մೳ 15 )PTU )PTU )PTU )PTU 3FBE8SJUF 3FBE 3FBE8SJUF 3FBE8SJUF )PTU ͕ഉଞϩοΫͰ ։͍͍ͯΔΑ pMF ϒϩοΫετϨʔδ ϑΝΠϧετϨʔδ
"DDFTT.PEFT 16 /PEF /PEF 3FBE 3FBE 3FBE8SJUF0ODF 380 3FBE0OMZ.BOZ 309
/PEF /PEF 3FBE8SJUF.BOZ 389 ‣ ͭͷ/PEF͔Β3FBE 8SJUFͰϚϯτͰ͖Δ ‣ ෳͷ/PEF͔Β3FBE 0OMZͰϚϯτͰ͖Δ ‣ ෳͷ/PEF͔Β3FBE 8SJUFͰϚϯτͰ͖Δ /PEF 3FBE8SJUF 3FBE8SJUF 3FBE8SJUF
1FSTJTUFOU7PMVNF QW ‣ 7PMVNFΛද͢Ϧιʔε 4UPSBHFUZQF 4UPSBHF$MBTT໊ 4J[F
"DDFTTNPEFT 3FDMBJNQPMJDZ w 3FUBJO w 3FDZDMF %FQSFDBUFE w %FMFUF 17
3FDMBJN1PMJDZ ‣ 17$Λআͨ࣌͠ɺ17ΛͲ͏͢Δ͔ΛܾΊΔϙϦγʔ 18 17$আ 17$আ 17$আ ͦͷ·· σʔλΛ আ
17Λআ 3FUBJO 3FDZDMF %FQSFDBUFE %FMFUF
4UPSBHF$MBTT TD ‣ ετϨʔδϓʔϧΛද͢Ϟσϧ /BNF 3FDMBJNQPMJDZ 1SPWJTJPOFS
‣ 1SPWJTJPOFS͕ετϨʔδஔͷ "1*Λݺͼग़͠ 19
$4* $POUBJOFS4UPSBHF*OUFSGBDF ‣ ίϯςφΦʔέετϨʔγϣϯ͚ͷඪ४༷ ‣ ओཁͳίϯςφΦʔέετϨʔγϣϯ͕࠾༻ ,VCFSOFUFT $MPVE'PVOESZ .FTPT %PDLFS
FUD ‣ ,VCFSOFUFTͰʹͯ("αϙʔτ ‣ ,VCFSOFUFTͷιʔεπϦʔ JOUSFF Ͱཧ͞Ε͍ͯͨετϨʔδஔʹ ؔ࿈͢Δ࣮͕ɺSEϕϯμͰಠࣗʹ։ൃఏڙ͢Δ͜ͱ͕Մೳ ‣ ,VCFSOFUFTͰJOUSFFഇࢭ༧ఆɺ$4*ͷҠߦ͕ਪਐத 20
1FSTJTUFOU7PMVNFͷׂΓͯ ‣ 1FSTJTUFOU7PMVNFͷׂΓͯʹେ͖ͭ͘ͷํ๏ ‣ .BOVBM1SPWJTJPOJOH ཧऀ͕4UPSBHF$MBTTͱ1FSTJTUFOU7PMVNFΛࣄલʹ࡞ Ϣʔβ1FSTJTUFOU7PMVNF$MBJNΛͬͯ1FSTJTUFOU7PMVNFΛબ ‣
%ZOBNJD1SPWJTJPOJOH ཧऀ4UPSBHF$MBTTͷΈࣄલʹ४උ Ϣʔβ͕1FSTJTUFOU7PMVNF$MBJNΛ࡞͢Δͱ 1FSTJTUFOU7P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VM4FU TUT 35 ‣ 17$17Λศར͔ͭ҆શʹ͏ͳΒ4UBUFGVM4FU͕Φεεϝ ‣ 4UBUFGVM4FUΛআͯ͠4UBUFGVM4FUͱ1PE͕ফ͑ΔͷΈ 17$ 17আ͞Εͳ͍
Φϖϛεࢭ ‣ ಛ 1PE໊ʹ࿈ଓͨ͠φϯόϦϯά FH NZTRM NZTRMʜ ετϨʔδʹ༏͍͠ಈ࡞ ҆શ 17$Λࣗಈੜͯ͘͠ΕΔWPMVNF$MBJN5FNQMBUFT ‣ 17$17ͷαΠζ֦ு 7PMVNF&YQBOTJPO Ͱҙ͕ඞཁ˞ ɾɾ ˞$/%5l1FSTJTUFOU7PMVNFͷҰาਐΜ͍ͩํzࢀর IUUQTTQFBLFSEFDLDPNZTBLBTIJUBQFSTJTUFOUWPMVNFGBMTFCVKJOOEBTIJJGBOH
ಛ࿈ଓͨ͠φϯόϦϯά ‣ 4UBUFGVM4FU͔Βੜ͞ΕΔ1PEͷ໊લࣗಈͰφϯόϦϯά ‣ 1PEʹׂΛઃఆ͠қ͍ εΫϦϓτͳͲͰศར 36 LVCFDUMHFUQPE NAME
READY STATUS RESTARTS AGE mysql-0 2/2 Running 0 69s mysql-1 2/2 Running 0 59s mysql-2 2/2 Running 0 52s NZTRM NZTRM NZTRM 4PVSDF 3FQMJDB 3FQMJDB
ಛετϨʔδʹ༏͍͠ಈ࡞ ‣ 1PEΛߋ৽͢Δࡍɺඞͣલͷ൪߸ͷ1PEͷॲཧ͕͔ྃͯ͠Β࣮ߦ ‣ ετϨʔδͷ%FUBDI͕ߦΘΕͨޙɺ"UUBDI͕࣮ߦ͞ΕΔ͜ͱ͕อূ ‣ %FQMPZNFOUͩͱ"UUBDIʹࣦഊɺσʔλഁյʹܨ͕Δ߹͕͋ΔͷͰҙ 3PMMJOH 6QEBUF FUD
3VOOJOH 5FSNJOBUJOH $SFBUJOH ಉ࣌ʹൃੜ 38 Ϛϯτʹࣦഊ ಉҰϑΝΠϧͷ8SJUF ͕ൃੜ͢ΔϦεΫ͋Γ 3PMMJOH 6QEBUF FUD 3VOOJOH $SFBUJOH ݹ͍1PE͕আޙɺ࡞։࢝ 38 QPEYYY QPEYYY QPEZZZ QPE QPE QPE %FQMPZNFOU 4UBUFGVM4FU
ઃఆ༰ 17$ͱಉ͡ ಛWPMVNF$MBJN5FNQMBUFT ‣ 4UBUFGVM4FUΛσϓϩΠ͢Δͱ1PEͷੜʹ͋Θͤͯ17$ੜ 38 apiVersion: apps/v1 kind: StatefulSet
metadata: name: mysql … containers: … volumeMounts: - name: data mountPath: /var/lib/mysql … volumeClaimTemplates: - metadata: name: data spec: storageClassName: standard accessModes: [“ReadWriteOnce”] resources: requests: storage: 10Gi LVCFDUMHFUQPE NAME READY STATUS RESTARTS AGE mysql-0 2/2 Running 0 156m mysql-1 2/2 Running 0 156m mysql-2 2/2 Running 0 156m LVCFDUMHFUQWD NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE data-mysql-0 Bound pvc-XXX 10Gi RWO standard 164m data-mysql-1 Bound pvc-YYY 10Gi RWO standard 163m data-mysql-2 Bound pvc-ZZZ 10Gi RWO standard 161m LVCFDUMHFUQW NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-xxx 10Gi RWO Delete Bound db/data-mysql-1 standard 165m pvc-yyy 10Gi RWO Delete Bound db/data-mysql-2 standard 163m pvc-zzz 10Gi RWO Delete Bound db/data-mysql-0 standard 166m 1717$͕ੜ͞ΕΔͱ %ZOBNJD1SPWJTJPOJOH ʹΑΓࣗಈੜ WPMVNF$MBJN5FNQMBUFͷ໊લ 4UBUFGVM4FUͷ໊લ࿈൪ Ͱ17$͕ੜ
·ͱΊ 39 ‣ σʔλͷӬଓԽʹؔ͢Δجຊతͳߟ͑ํΛհ ‣ ,VCFSOFUFTͰͷετϨʔδͷϞσϧͱಈ͖Λհ ‣ 17$17Λศར͔ͭ҆શʹ͏4UBUFGVM4FUʹ͍ͭͯհ ‣ ,VCFSOFUFTͰɺநԽ͞ΕͨϞσϧʹΑΓ
ετϨʔδΛར༻͢ΔͷγϯϓϧͰ؆୯ ‣ ͍͠͠ͱ͢ΕɺͦͦͷεςʔτϑϧΞϓϦετϨʔδͷӡ༻ εςʔτϑϧΞϓϦετϨʔδͷӡ༻ܦݧ͕ઙ͍߹ɺ ॳΊ͔ΒϏδωεΫϦςΟΧϧͳσʔλʹઓͤͣɺ ࣦͬͯϏδωεʹӨڹͷগͳ͍σʔλ͔Βઓ͠ϊϋΛੵ ͜Ε͔Βεςʔτϑϧઓ͢ΔਓͷҰݴ