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
78
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
71
コンテナセキュリティの基本と脅威への対策
kyohmizu
4
1.1k
安全な Kubernetes 環境を目指して
kyohmizu
4
840
Unlocking Cloud Native Security
kyohmizu
5
1k
コンテナ × セキュリティ × AWS
kyohmizu
10
3.4k
コンテナセキュリティ
kyohmizu
10
4k
コンテナイメージのマルウェア検出とその実用性について
kyohmizu
4
2.6k
Play with 🐐 in Kubernetes
kyohmizu
1
1.1k
Security Command Center × PagerDuty 自動アラート通知の取り組み
kyohmizu
0
520
Other Decks in Technology
See All in Technology
可視化プラットフォームGrafanaの基本と活用方法の全て
hamadakoji
0
230
エンジニア向け会社紹介資料
caddi_eng
14
220k
MySQLのロックの種類とその競合
yoku0825
6
1.6k
DevIO2024_レガシー運用からの脱却 -クラウド活用の実践事例とベストプラクティス-
jun2882
0
210
AWSで”最小権限の原則”を実現するための考え方 /20240722-ssmjp-aws-least-privilege
opelab
10
4.3k
ギークの理想が7つ集まるエムスリーで夢を叶えよう - エムスリー株式会社
m3_engineering
1
260
AWSでRAGを作る法方
sonoda_mj
1
140
What is DRE? - Road to SRE NEXT@広島
chanyou0311
3
620
運用改善、不都合な真実 / 20240722-ssmjp-kaizen
opelab
17
8k
フルリモートワークはエンジニアの夢を叶えたか? #cm_odyssey
mamohacy
2
600
コンテナ・K8s研修 - 前半 コンテナ基礎・ハンズオン【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
170
What if...? 처음부터 다시 LLM 어플리케이션을 개발한다면
huffon
0
1k
Featured
See All Featured
What's new in Ruby 2.0
geeforr
338
31k
Producing Creativity
orderedlist
PRO
340
39k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
17
1.5k
Mobile First: as difficult as doing things right
swwweet
219
8.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
28
2.2k
From Idea to $5000 a Month in 5 Months
shpigford
377
46k
Thoughts on Productivity
jonyablonski
64
4.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
121
18k
Six Lessons from altMBA
skipperchong
24
3.2k
Scaling GitHub
holman
458
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.8k
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