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
72
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
3
760
安全な Kubernetes 環境を目指して
kyohmizu
4
670
Unlocking Cloud Native Security
kyohmizu
5
900
コンテナ × セキュリティ × AWS
kyohmizu
10
3.2k
コンテナセキュリティ
kyohmizu
10
3.8k
コンテナイメージのマルウェア検出とその実用性について
kyohmizu
4
2.2k
Play with 🐐 in Kubernetes
kyohmizu
1
1.1k
Security Command Center × PagerDuty 自動アラート通知の取り組み
kyohmizu
0
460
サイバー攻撃から Kubernetes クラスタを守るための効果的なセキュリティ対策
kyohmizu
13
3.2k
Other Decks in Technology
See All in Technology
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
140
本当のAWS基礎
toru_kubota
0
510
VS CodeでAWSを操作しよう
smt7174
7
1.6k
地理空間データ可視化・解析・活用ソリューション Pacific Spatial Solutions (PSS)
pacificspatialsolutions
0
230
DevOpsDays History and my DevOps story
kawaguti
PRO
9
2.5k
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
440
競技としてのKaggle、役に立つKaggle
yu4u
3
510
開発生産性向上サービスを作るFindyが自分たちで開発生産性を爆上げした組織づくりの歩み / Findy's path to boosting its own development productivity 2024-04-17
ma3tk
3
650
複雑な構成要素を持つUIとの向き合い方 〜新・支出グラフでの実例〜 / B43 TECH TALK
nakamuuu
0
140
生産性向上チームの紹介
cybozuinsideout
PRO
1
870
20分で完全に理解するGrafanaダッシュボード
hamadakoji
3
500
よく聞くけど使ったことないソフトウェアNo.1 KafkaとSnowflake
foursue
4
350
Featured
See All Featured
Scaling GitHub
holman
457
140k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
GitHub's CSS Performance
jonrohan
1025
450k
Design by the Numbers
sachag
274
18k
Being A Developer After 40
akosma
57
580k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
GraphQLとの向き合い方2022年版
quramy
32
12k
Documentation Writing (for coders)
carmenintech
60
3.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
320
23k
Designing the Hi-DPI Web
ddemaree
276
33k
Imperfection Machines: The Place of Print at Facebook
scottboms
260
12k
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