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
980
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
250
Kubernetes Persistent Volume向け ゾーン障害への備え
ysakashita
0
1.7k
はじめよう Kubernetes PersistentVolume のバックアップ
ysakashita
3
1.1k
2022年コンテナ/Kubernetes向けストレージ技術の最新動向
ysakashita
9
5.2k
Cloud Nativeに向けた考えるべきポイント
ysakashita
1
270
ステートフルアプリ on Kubernetesの現在と今後の展望
ysakashita
2
760
VM時代からコンテナ時代へストレージ管理の移り変わり
ysakashita
9
7.6k
Kubernetes時代のストレージ
ysakashita
1
630
PersistentVolumeの一歩進んだ使い方
ysakashita
3
1.7k
Other Decks in Technology
See All in Technology
Riverpod & Riverpod Generatorを利用して状態管理部分の処理を書き換えてみる簡単な事例紹介
fumiyasac0921
0
110
SaaSプロダクト開発におけるバグの早期検出のためのAcceptance testの取り組み
kworkdev
PRO
0
470
スケールアップ企業のQA組織のバリューを最大限に引き出すための取り組み
tarappo
4
960
Enterprise AI in 2025?
pamelafox
0
110
Cline、めっちゃ便利、お金が飛ぶ💸
iwamot
19
19k
大規模アジャイル開発のリアル!コミュニケーション×進捗管理×高品質
findy_eventslides
0
580
30代エンジニアが考える、エンジニア生存戦略~~セキュリティを添えて~~
masakiokuda
4
2k
アプリケーション固有の「ロジックの脆弱性」を防ぐ開発者のためのセキュリティ観点
flatt_security
33
12k
データベースで見る『家族アルバム みてね』の変遷 / The Evolution of Family Album Through the Lens of Databases
kohbis
2
650
「家族アルバム みてね」を支えるS3ライフサイクル戦略
fanglang
1
280
Symfony in 2025: Scaling to 0
fabpot
2
210
年末調整プロダクトの内部品質改善活動について
kaomi_wombat
0
210
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
45
14k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Gamification - CAS2011
davidbonilla
81
5.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.4k
How GitHub (no longer) Works
holman
314
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Mobile First: as difficult as doing things right
swwweet
223
9.5k
Scaling GitHub
holman
459
140k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
8
700
The Invisible Side of Design
smashingmag
299
50k
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Λ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͏4UBUFGVM4FU
4UBUFGVM4FU 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ͰɺநԽ͞ΕͨϞσϧʹΑΓ
ετϨʔδΛར༻͢ΔͷγϯϓϧͰ؆୯ ‣ ͍͠͠ͱ͢ΕɺͦͦͷεςʔτϑϧΞϓϦετϨʔδͷӡ༻ εςʔτϑϧΞϓϦετϨʔδͷӡ༻ܦݧ͕ઙ͍߹ɺ ॳΊ͔ΒϏδωεΫϦςΟΧϧͳσʔλʹઓͤͣɺ ࣦͬͯϏδωεʹӨڹͷগͳ͍σʔλ͔Βઓ͠ϊϋΛੵ ͜Ε͔Βεςʔτϑϧઓ͢ΔਓͷҰݴ