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
VolumePluginの仕組みと実装解説
Search
Kyohei Mizumoto
February 22, 2021
Technology
0
100
VolumePluginの仕組みと実装解説
勉強会の資料です。
https://k8sinternal.connpass.com/event/203946/
Kyohei Mizumoto
February 22, 2021
Tweet
Share
More Decks by Kyohei Mizumoto
See All by Kyohei Mizumoto
コンテナサプライチェーンセキュリティ
kyohmizu
1
200
サイバーセキュリティの最新動向:脅威と対策
kyohmizu
1
250
コンテナセキュリティの基本と脅威への対策
kyohmizu
4
1.6k
安全な Kubernetes 環境を目指して
kyohmizu
4
1.1k
Unlocking Cloud Native Security
kyohmizu
5
1.3k
コンテナ × セキュリティ × AWS
kyohmizu
11
3.9k
コンテナセキュリティ
kyohmizu
10
4.2k
コンテナイメージのマルウェア検出とその実用性について
kyohmizu
4
3.6k
Play with 🐐 in Kubernetes
kyohmizu
1
1.3k
Other Decks in Technology
See All in Technology
Spring Bootで実装とインフラをこれでもかと分離するための試み
shintanimoto
3
340
食べログが挑む!飲食店ネット予約システムで自動テスト無双して手動テストゼロを実現する戦略
hagevvashi
1
160
AI Agentを「期待通り」に動かすために:設計アプローチの模索と現在地
kworkdev
PRO
2
380
”知のインストール”戦略:テキスト資産をAIの文脈理解に活かす
kworkdev
PRO
9
4.1k
10分でわかるfreeeのQA
freee
1
12k
Automatically generating types by running tests
sinsoku
1
430
7,000名規模の 人材サービス企業における プロダクト戦略・戦術と課題 / Product strategy, tactics and challenges for a 7,000-employee staffing company
techtekt
0
260
Lightdashの利活用状況 ー導入から2年経った現在地_20250409
hirokiigeta
2
270
JPOUG Tech Talk #12 UNDO Tablespace Reintroduction
nori_shinoda
1
120
Creating Awesome Change in SmartNews
martin_lover
1
240
Lakeflow Connectのご紹介
databricksjapan
0
100
LLM as プロダクト開発のパワードスーツ
layerx
PRO
1
190
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
Being A Developer After 40
akosma
91
590k
GraphQLの誤解/rethinking-graphql
sonatard
71
10k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Music & Morning Musume
bryan
47
6.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Optimising Largest Contentful Paint
csswizardry
36
3.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.1k
Code Reviewing Like a Champion
maltzj
522
39k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.2k
Unsuck your backbone
ammeep
670
57k
Transcript
VolumePluginの仕組みと実装解説
varsion: v2 name: "Kyohei Mizumoto" role: "SRE" interests: - "kubernetes"
- "public cloud" - "golang" twitter: "@kyohmizu" url: "https://kyohmizu.com/" whoami
今⽇話すこと VolumePluginの概要 Volume作成の仕組み 実装解説 VolumeManager VolumePlugin (emptyDir/ConfigMap/Secret)
注意点 kubernetes v1.20.2ベースでお話しします Linuxノードに直接作成するVolumeが対象です (Windowsノード、CSI等は取り扱いません) 理解不⾜により内容に誤りがある可能性があります…︕
kubeletについて こちらを参照 https://speakerdeck.com/bells17/kubelet
VolumePluginについて kubelet内で動作するPlugin pod.spec.volumesに基づいてノード上にVolumeを作成する Volumeの種類ごとにPluginが⽤意されている https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#volume-v1-core
Volume作成の仕組み
引⽤︓https://speakerdeck.com/bells17/kubelet?slide=17
None
None
Volume作成の仕組み desired state of world ノードに作成・アタッチすべきVolume⼀覧 actual state of world
ノードに作成・アタッチされたVolume⼀覧 desired state of world populator ノードにスケジュールされたPod⼀覧からdswを更新する reconciler dswとaswを⽐較し、未作成のVolumeの作成とaswの更新を⾏う
実装解説
実装解説 VolumePlugin定義 初期化 (kubelet起動時) Volume作成の流れ VolumePluginの実装 emptyDir ConfigMap Secret
実装解説 emptyDir/ComfigMap/Secretの保存パスについて Secretはメモリ領域(tmpfs)に作成される ComfigMap/Secretの動的更新と修復 emptyDirのv1.20での修正内容
実装解説 資料のリンク https://gist.github.com/kyohmizu/23ab1e76ebc2a2984694b144a0be9b78