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
クラウドネイティブの基盤要素、コンテナの今と未来
Search
うたもく
August 03, 2023
Technology
7.1k
21
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
クラウドネイティブの基盤要素、コンテナの今と未来
https://event.cloudnativedays.jp/cndf2023/talks/1910
うたもく
August 03, 2023
More Decks by うたもく
See All by うたもく
OSS の脆弱性対応の舞台裏
utam0k
2
1.5k
オープンソースソフトウェアへの解像度🔬
utam0k
18
5.4k
CNCF Project の作者が考えている OSS の運営
utam0k
7
1.1k
Podman with WebAssembly
utam0k
2
1k
Possibility of OCI Container Runtime with Rust
utam0k
3
1.6k
Container-related technologies supporting Gitpod
utam0k
1
1.3k
詳説 OCIコンテナランタイム youki@第15回 コンテナ技術の情報交換会
utam0k
5
2.3k
Rust 🤝 Container Runtime @ Rust.Tokyo 2021
utam0k
2
2k
「あれ、コンテナって何だっけ?」から生まれた Rust で書かれた コンテナランタイム youkiの話@ODC2021
utam0k
6
4.3k
Other Decks in Technology
See All in Technology
From Prompt Engineering to Loop Engineering
shibuiwilliam
1
280
PostgreSQL 19 新機能概要 OSC Hokkaido 2026
nori_shinoda
0
260
5分でわかるDuckDB Quack
chanyou0311
4
270
スタートアップにAmazon EKSは早すぎる? マルチプロダクト戦略を加速する Platform Engineeringの実践 / Is Amazon EKS Too Soon for Startups? Practical Platform Engineering to Accelerate a Multi-Product Strategy
elmodev09
1
1.9k
そこにあるから地図ができる~位置を示す"モノ"を愉しむ~ - Interface 2026年6月号GPS特集オフ会 / interface_202606_GPS_offline
sakaik
1
120
トークン最適化のためのユーザーストーリー分析 / User Story Analysis for Token Optimization
oomatomo
0
130
攻撃者がいなくてもAIエージェントはインシデントを起こす
nomizone
0
150
AIをフル活用してオンコール機能のプロトタイプを2日で作った話 / Building an AI-Powered On-Call Prototype in Just Two Days
nari_ex
0
150
AI-DLCを “そのまま導入しなかった”話 ~組織に合わせてアジャストした 私たちの実践共有~
hiroramos4
PRO
1
440
初めてのDatabricks勉強会
taka_aki
2
190
10年間のブログ発信を振り返って見えたWebアプリケーションエンジニアとしての軌跡
stefafafan
0
190
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
240
Featured
See All Featured
New Earth Scene 8
popppiees
3
2.4k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
170
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
170
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.4k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
470
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
210
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
How to Ace a Technical Interview
jacobian
281
24k
The Cost Of JavaScript in 2023
addyosmani
55
10k
The Spectacular Lies of Maps
axbom
PRO
1
830
Transcript
クラウドネイティブの基盤要素 コンテナの今と未来 CloudNative Days Fukuoka 2023 Toru Komatsu(@utam0k)
2 Preferred Networks, Inc. 社内向けオンプレML基盤の開発‧運⽤ 趣味でのOSS活動 メンテナ opencontainers/runtime-spec containers/youki レビュワー
containerd/runwasi @utam0k KOMATSU Toru
3 Preferred Networks, Inc. 社内向けオンプレML基盤の開発‧運⽤ 趣味でのOSS活動 メンテナ opencontainers/runtime-spec containers/youki レビュワー
containerd/runwasi @utam0k KOMATSU Toru We are Hiring!!
コンテナの今 4 00
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface Kubeletの実⾏の流れ 5
Kubelet Linux など Container Runtime Low-Level Container Runtime I nterface
6
Kubelet Linux など Container Runtime Low-Level Container Runtime I nterface
gRPC 7
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface 8
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface イメージとかコンテナ管理 9
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface コンテナの作成 ワンショットバイナリ 10
コンテナの今 ? 11 00
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface ここでは OCI Runtime Spec を満たすものをコンテナと呼ぶ 12
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface JSON設定ファイルと サブコマンド 例) ./runc create $id でコンテナとは何か定めている 13
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface 14
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface Kubeletの実行の流れ 15
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface Kubeletの実行の流れ 16
Container Runtime I nterface Low-Level OCI Runtime Spec ➔ マイクロサービス的
➔ プラグイン機構 17
A P I Image Services Snapshot Services Containers Service Tasks
Service ‧ ‧ ‧ Container Runtime I nterface Core Backend ContentStore plugin / local Snapshotter plugin / overlay / … Runtime v2 shim client containerd shim OCI Runtime Spec ttrpc 18
マイクロサービス的なアーキテクチャ A P I Image Services Snapshot Services Containers Service
Tasks Service ‧ ‧ ‧ Container Runtime I nterface Core ContentStore plugin / local Snapshotter plugin / overlay / … Runtime v2 shim client containerd shim OCI Runtime Spec ttrpc Backend 19
A P I Image Services Snapshot Services Containers Service Tasks
Service ‧ ‧ ‧ Container Runtime I nterface Core Backend ContentStore plugin / local Snapshotter plugin / overlay / … Runtime v2 shim client containerd shim OCI Runtime Spec ttrpc ワンショットバイナリ 20
21 Kubelet → Container Runtime → Container ➔ High /
Low-Level Container Runtime Specification ➔ Container Runtime Interface ➔ OCI Runtime Specification containerd ➔ マイクロサービス ➔ プラグイン機構 Recap
コンテナの未来 22 01
⚠ 個⼈の⾒解 ⚠ 23
WebAssembly 24 02
WebAssembly 25
WebAssembly 26 Portability Small Size Security
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface 27
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface 28
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface このあたりでWebAssemblyの対応が必要 よんだ? 29
30 containerd/runwasi containerd-shimによる拡張 現実世界で既に実験段階 Docker Desktop Azure Kubernetes Service runwasi
A P I Image Services Snapshot Services Containers Service Tasks
Service ‧ ‧ ‧ Container Runtime I nterface Core Backend ContentStore plugin / local Snapshotter plugin / overlay / … Runtime v2 shim client containerd shim OCI Runtime Spec ttrpc この部分の拡張 31
Kubelet Linux など Container Runtime High-Level Low-Level Container Runtime I
nterface WebAssembly 実行の流れ 32
33 ktock/container2wasm 既存のコンテナ資源の活⽤ container2wasm
Lazy Pulling 34 03
35 $ nerdctl --snapshotter=stargz run python:3.7-esgz python3 -c 'exit()' index-sha256:6a42...4948:
done |++++++++++++++++++++++++++++++| manifest-sha256:1c57...20c5: done |++++++++++++++++++++++++++++++| config-sha256:f590...1df5: done |++++++++++++++++++++++++++++++| elapsed: 11.0 s total: 4.8 Ki (1.5 KiB/s) $ nerdctl run python:3.7-org python3 -c 'exit()' index-sha256:6008....1237: done |++++++++++++++++++++++++++++++| manifest-sha256:48ea...30ce7: done |++++++++++++++++++++++++++++++| config-sha256:94c9....9290: done |++++++++++++++++++++++++++++++| layer-sha256:f860....fbf6: done |++++++++++++++++++++++++++++++| layer-sha256:d779....3cc5: done |++++++++++++++++++++++++++++++| … layer-sha256:adbd....f52c: done |++++++++++++++++++++++++++++++| layer-sha256:c495....736a: done |++++++++++++++++++++++++++++++| elapsed: 41.3s total: 321.3 (16.7 MiB/s) Lazy Pulling
36 $ nerdctl --snapshotter=stargz run python:3.7-esgz python3 -c 'exit()' index-sha256:6a42...4948:
done |++++++++++++++++++++++++++++++| manifest-sha256:1c57...20c5: done |++++++++++++++++++++++++++++++| config-sha256:f590...1df5: done |++++++++++++++++++++++++++++++| elapsed: 11.0 s total: 4.8 Ki (1.5 KiB/s) $ nerdctl run python:3.7-org python3 -c 'exit()' index-sha256:6008....1237: done |++++++++++++++++++++++++++++++| manifest-sha256:48ea...30ce7: done |++++++++++++++++++++++++++++++| config-sha256:94c9....9290: done |++++++++++++++++++++++++++++++| layer-sha256:f860....fbf6: done |++++++++++++++++++++++++++++++| layer-sha256:d779....3cc5: done |++++++++++++++++++++++++++++++| … layer-sha256:adbd....f52c: done |++++++++++++++++++++++++++++++| layer-sha256:c495....736a: done |++++++++++++++++++++++++++++++| elapsed: 41.3s total: 321.3 Mi (16.7 MiB/s) layersがない 起動までがはやい!
37 cache stargz-snapshotter Container Registry FUSE Driver Overlayfs User Kernel
open(“file”)
A P I Image Services Snapshot Services Containers Service Tasks
Service ‧ ‧ ‧ Container Runtime I nterface Core Backend ContentStore plugin / local Snapshotter plugin / overlay / … Runtime v2 shim client containerd shim OCI Runtime Spec ttrpc この部分の拡張 38
A P I Image Services Snapshot Services Containers Service Tasks
Service ‧ ‧ ‧ Container Runtime I nterface Core Backend ContentStore plugin / local Snapshotter plugin / overlay / … Runtime v2 shim client containerd shim OCI Runtime Spec ttrpc stargz snapshotter grpc 39
40 cache stargz-snapshotter Container Registry FUSE Driver Overlayfs open(“file”) ①
② ④ ③ ⑤ ⑥ ⑦ User Kernel
41 cache stargz-snapshotter Container Registry FUSE Driver Overlayfs open(“file”) ①
② ④ ③ ⑤ ⑥ ⑦ User Kernel
42 cache stargz-snapshotter Container FUSE Driver Overlayfs open(“file”) ① ②
④ ③ ⑤ ⑥ ⑦ User Kernel Registry
43 cache stargz-snapshotter Container Registry FUSE Driver Overlayfs open(“file”) ①
② ④ ③ ⑤ ⑥ ⑦ User Kernel
44 cache stargz-snapshotter Container FUSE Driver Overlayfs open(“file”) ① ②
③ ⑤ ⑥ ⑦ User Kernel ④ Registry
45 $ nerdctl --snapshotter=stargz run python:3.7-esgz python3 -c 'exit()' index-sha256:6a42...4948:
done |++++++++++++++++++++++++++++++| manifest-sha256:1c57...20c5: done |++++++++++++++++++++++++++++++| config-sha256:f590...1df5: done |++++++++++++++++++++++++++++++| elapsed: 11.0 s total: 4.8 Ki (1.5 KiB/s) $ nerdctl run python:3.7-org python3 -c 'exit()' index-sha256:6008....1237: done |++++++++++++++++++++++++++++++| manifest-sha256:48ea...30ce7: done |++++++++++++++++++++++++++++++| config-sha256:94c9....9290: done |++++++++++++++++++++++++++++++| layer-sha256:f860....fbf6: done |++++++++++++++++++++++++++++++| layer-sha256:d779....3cc5: done |++++++++++++++++++++++++++++++| … layer-sha256:adbd....f52c: done |++++++++++++++++++++++++++++++| layer-sha256:c495....736a: done |++++++++++++++++++++++++++++++| elapsed: 41.3s total: 321.3 (16.7 MiB/s) Lazy Pulling
OCI Runtime Spec v1.1.0 46 04
Kubelet Linux など Container Runtime High-Level Low-Level OCI Runtime Spec
Container Runtime I nterface これ! 47
先⽉に3年ぶりのリリース! v1.0.2 からは21個の新しい機能 cgroup v2 / idmapped mount / seccomp
notify … OCI Runtime Specification v1.1.0 48
sched_setattr(2) をコンテナに適⽤される コンテナに対してnice値とか設定可能に コンテナってプロセスなんだ...というのを強く意識させられる 実装 runc#3895 , youki#1706 , crun✅
Scheduler entity #1188 49
ioprio_set (2) をコンテナに適⽤される バッチ処理とかI/Oが重たいけど重要度は⾼くない処理で書き 込みで他のコンテナへの迷惑を少なくする 実装 runc#3783 , youki ✅,
crun ✅ I/O Priority #1191 50
51 WebAssembly ➔ 新しい形 ➔ containerd-shim-wasm[edge|time]-v1 Lazy Pulling ➔ コンテナ起動の⾼速化
➔ Snapshotter Plugin OCI Runtime Specification v1.1.0 ➔ sched_setattr(2) : nice値を変更可能に ➔ ioprio_set(2)r(2) : I/Oの優先度を変更可能に Recap
謝辞 52 05
stargz snapshotterの実装について 丁寧に解説して頂きました ありがとうございました 53 TOKUNAGA Kohei -san @ktock
/ @TokunagaKohei
Thanks you! 54