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
3
840
安全な Kubernetes 環境を目指して
kyohmizu
4
700
Unlocking Cloud Native Security
kyohmizu
5
920
コンテナ × セキュリティ × AWS
kyohmizu
10
3.3k
コンテナセキュリティ
kyohmizu
10
3.9k
コンテナイメージのマルウェア検出とその実用性について
kyohmizu
4
2.2k
Play with 🐐 in Kubernetes
kyohmizu
1
1.1k
Security Command Center × PagerDuty 自動アラート通知の取り組み
kyohmizu
0
470
サイバー攻撃から Kubernetes クラスタを守るための効果的なセキュリティ対策
kyohmizu
13
3.2k
Other Decks in Technology
See All in Technology
認知症フレンドリーテックとスタックチャン
naokiuc
0
400
AWS Observability ベストプラクティス 大紹介
o11yfes2023
0
140
Cloudflare WorkersがPythonに対応したので試してみた
miura55
0
180
エムスリーQAチーム紹介資料 / Introduction of M3 QA Team
m3_engineering
1
260
From here to resilience - a travel guide
ufried
1
150
【TSkaigi】2024/05/11 当日スライド
kimitashoichi
13
3.7k
グイグイ系QAエンジニアでやっていくよ!
____rina____
0
550
Max out Local LLM in Challenging Environments
sashimimochi
2
230
TDD - Test Driven Drupal
opdavies
0
3k
知識と実践を紡ぐGenAI / Connecting Knowledge and experience with GenAI
aki_moon
2
130
AI JIMY - 登壇(インストール編)
hanacchi
0
120
5分で分かる(かもしれない) Vector engine for OpenSearch Serverless
tsukuboshi
1
290
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
228
130k
Atom: Resistance is Futile
akmur
260
25k
4 Signs Your Business is Dying
shpigford
176
21k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
The Art of Programming - Codeland 2020
erikaheidi
43
12k
It's Worth the Effort
3n
180
27k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Building Applications with DynamoDB
mza
88
5.7k
Thoughts on Productivity
jonyablonski
60
3.9k
Build your cross-platform service in a week with App Engine
jlugia
226
17k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
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