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
74
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
0
4
コンテナセキュリティの基本と脅威への対策
kyohmizu
3
860
安全な Kubernetes 環境を目指して
kyohmizu
4
710
Unlocking Cloud Native Security
kyohmizu
5
920
コンテナ × セキュリティ × AWS
kyohmizu
10
3.3k
コンテナセキュリティ
kyohmizu
10
3.9k
コンテナイメージのマルウェア検出とその実用性について
kyohmizu
4
2.3k
Play with 🐐 in Kubernetes
kyohmizu
1
1.1k
Security Command Center × PagerDuty 自動アラート通知の取り組み
kyohmizu
0
480
Other Decks in Technology
See All in Technology
開発スピードの維持向上を支える、テスト設計の 漸進的進化への取り組み / Continuous Test Design Development for Speed of Product Development
ropqa
0
190
PhpStorm超絶技巧40分集中講義 #phpconkagawa
yusuke
4
790
Security Hubのセキュリティスコアはどうやって計算されるか
toru_kubota
0
110
Domain-driven Design: A Complete Example
ewolff
2
280
QA経験のないエンジニアリング マネージャーがQAのカジュアル面談に出て 苦労していること・気づいたこと / scrum fest niigata 2024
yoshikiiida
2
690
漠然とOSSにコントリビュートしたいと思っていた昔の自分へ
sansantech
PRO
2
140
SRE活動を促進させるドキュメント技術 〜ドキュメントレビューって、どうやってる?〜
kenta_hi
0
110
大規模言語モデル (LLM)における低精度数値表現
pfn
PRO
3
880
Real World Type Puzzle and Code Generation
yukukotani
4
650
Qiitaアクセシビリティ史 ~ Qiitaの歩んできた道 ~
degudegu2510
0
100
From here to resilience - a travel guide
ufried
1
170
マルチテナントマルチクラスタKubernetesでもUXを損なわない認証認可の勘所
pfn
PRO
1
180
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
The Power of CSS Pseudo Elements
geoffreycrofte
62
5k
GraphQLとの向き合い方2022年版
quramy
33
13k
Embracing the Ebb and Flow
colly
80
4.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Build your cross-platform service in a week with App Engine
jlugia
226
17k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
Web development in the modern age
philhawksworth
203
10k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6.1k
Typedesign – Prime Four
hannesfritz
36
2.1k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Testing 201, or: Great Expectations
jmmastey
30
6.4k
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