Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Kubernetesの基礎の基礎
Search
Satoru Takeuchi
PRO
September 11, 2021
Technology
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kubernetesの基礎の基礎
以下動画のテキストです
https://youtu.be/6nWkYN8R_U8
Satoru Takeuchi
PRO
September 11, 2021
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
68
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
93
あなたの知らないバージョン命名規則
sat
PRO
3
900
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
64
Machine Check Exception
sat
PRO
2
66
バイナリダンプの模様を読む
sat
PRO
0
89
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
88
114-ファイルのshallow_copy.pdf
sat
PRO
2
57
113-Btrfsのスナップショット.pdf
sat
PRO
0
40
Other Decks in Technology
See All in Technology
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
250
HRC_Frontend_Conference_Fukuoka_2026.pdf
ts020
0
740
Minecraft JavaのMODをSwiftで作る
1mash0
0
170
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
1
1.6k
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
4
630
あるけみー式LTスライド作成術
alchemy1115
2
220
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
2k
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
1
2.8k
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
160
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
160
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
4
1.3k
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
4
220
Featured
See All Featured
We Are The Robots
honzajavorek
0
380
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Mind Mapping
helmedeiros
1
360
GitHub's CSS Performance
jonrohan
1033
470k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
280
Fireside Chat
paigeccino
43
4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
Transcript
Kubernetesの基礎の基礎 Sep, 11st, 2021 Satoru Takeuchi twitter: satoru_takeuchi
対象読者 • Kubernetes(k8s)よくわからん • そもそも用語がわからん ◦ 宣言的(declarative) ◦ 命令的(imperative) •
コンテナが何かは知っている。Docker触ったことある
Kubernetesとは • コンテナ化されたアプリケーションの実行基盤 1. 複数マシンにまたがる分散システム • 実行の流れ 1. アプリのあるべき状態を書いた yaml(マニフェスト)をK8sにapply
2. あるべき状態を保つために K8sが頑張ってくれる
従来型アプリ実行基盤との違い • やりたいこと ◦ nginxを2多重で動かす • 誰が何をするか ◦ 従来型: 命令型管理(imperative
management) i. nginxコンテナを2つ動かす ii. 1つ落ちたら人間が1つ再起動 ◦ K8s: 宣言的管理(declarative management) i. 右のマニフェストをapply ii. K8sがnginxコンテナを2つ立ち上げる iii. コンテナが落ちたらK8sが自動的に再起動 • 宣言型はアプリの管理が楽 ◦ 📝 ややこしいトラブルのときは相変わらず人間が頑張らなければいけない 4 apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: replicas: 2 template: spec: containers: - name: nginx image: nginx:1.14.2
アプリ実行までの流れ 1. ユーザがDeploymentのマニフェストをapply 2. K8sがマニフェストに対応するDeploymentリソースを作る 3. K8sがReplicasetリソースを作る ◦ 📝 Deploymentとの違いは気にしなくていい
4. K8sがreplicasフィールドの値だけPodリソースを作る ◦ Podは1つ以上のコンテナのかたまり 5. K8sがPodリソースに対応するコンテナを実行 5
ユーザがDeploymentのマニフェストをapply • kubectl apply nginx.yaml 6 K8sクラスタ アプリのマニフェスト よろしく
K8sがマニフェストに対応するDeploymentリソースを作る 7 K8sクラスタ アプリのマニフェスト Deploymentリソース
K8sがDeploymentリソースに対応するReplicaSetリソースを作る 8 K8sクラスタ ReplicaSetリソース Deploymentリソース
K8sがReplicaSetリソースに対応するPodリソースを作る 9 K8sクラスタ ReplicaSetリソース Deploymentリソース Podリソース Podリソース
K8sがPodリソースに対応するコンテナを実行 10 K8sクラスタ ReplicaSetリソース Deploymentリソース Podリソース Podリソース nginxコンテナ nginxコンテナ
ユーザはマニフェストをK8sに食わせただけ! 11 K8sクラスタ ReplicaSetリソース Deploymentリソース Podリソース Podリソース nginxコンテナ nginxコンテナ まさに宣言的(declarative)!
参考サイト • Manage Kubernetes Objects ◦ https://kubernetes.io/docs/tasks/manage-kubernetes-objects/