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
Lecture__1.pdf
Search
ry
February 10, 2020
Education
370
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lecture__1.pdf
ry
February 10, 2020
More Decks by ry
See All by ry
Kubernetesにおける推論基盤
ry
3
860
eBPF Tools on Kubernetes part1
ry
0
370
Vault Secrets Operator Tutorial
ry
0
610
KyvernoとRed Hat ACMを用いたマルチクラスターの一元的なポリシー制御
ry
0
1.3k
明日から始められるKyvernoを用いたポリシー制御
ry
4
950
CNDT2022 k8snovice Community introduction
ry
0
180
Policy Engine on Kubernetes
ry
1
1.5k
ConfigMap and Secret
ry
0
430
Policy Manager試してみた!
ry
0
460
Other Decks in Education
See All in Education
AWS Certified Generative AI Developer - Professional Beta 不合格体験記
amarelo_n24
1
320
JAWS-UG初心者支部#81 GWにEduJAWSと何か作ろうもくもく会!
otsuki
0
130
2026年度春学期 統計学 第7回 データの関係を知る(2)ー 回帰と決定係数 (2026. 5. 21)
akiraasano
PRO
0
130
Course Review - Lecture 13 - Information Visualisation (4019538FNR)
signer
PRO
1
2.6k
Visionary Initiative: Future Intelligence 「未来の知性と社会の礎を築く」|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
120
Info Session MSc Computer Science & MSc Applied Informatics
signer
PRO
0
280
We部コミュニティスライド2026-04-24
junhat6
0
170
Populism, Post-Liberalism & Climate Change
vyadav
0
180
Managing Complexity: India’s Semiconductor Ambitions & New Industrial Policy
vyadav
0
170
Lectura 2 (PIT : Python Basico)
robintux
0
350
Catecismo 26 #1 - Aula inaugural
cm_manaus
0
160
Gesture-based Interaction - Lecture 6 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
2.3k
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
200
We Are The Robots
honzajavorek
0
240
BBQ
matthewcrist
89
10k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
My Coaching Mixtape
mlcsv
0
140
Un-Boring Meetings
codingconduct
0
310
Building Adaptive Systems
keathley
44
3k
HDC tutorial
michielstock
2
690
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
400
Test your architecture with Archunit
thirion
1
2.3k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
430
Transcript
Lecture for today’s theme ry (@URyo_0213) 2020/2/10 Kubernetes Wakaran Tokyo
#1
Podͷ࡞ ղ • metadata Podʹ༩͑Δmetadata - Podʹ`nginx`ͱ͍͏໊લ - ֎෦͔ΒͷҹͱͳΔlabel Λ༩͍ͯ͠Δɻ
• spec.containers Containerͷใ Container name: nginx image: nginx (version 1.17.5) exported port: 80
Podͱ • WorkloadsϦιʔεͷ࠷খ୯Ґ • 1ͭҎ্ͷίϯςφ͔Βߏ͞ΕΔ • PodͷίϯςφɺωοτϫʔΫΛڞ༗͢Δ ·ͯΑ… ͲΜͳ࣌ʹPodͷதʹ ෳίϯςφೖΕΔΜͩʁʁʁ
جຊύλʔϯ • αΠυΧʔύλʔϯ • Ξϯόαμύλʔϯ • Ξμϓλύλʔϯ ~ Ԡ༻ ~
• ελοΫɾΪϟβʔ • etc…
جຊύλʔϯ • αΠυΧʔύλʔϯ • Ξϯόαμύλʔϯ • Ξμϓλύλʔϯ ~ Ԡ༻ ~
• ελοΫɾΪϟβʔ • etc…
αΠυΧʔύλʔϯ • PodͷதͰɺmainίϯςφ(ΞϓϦέʔγϣϯ )ͷػೳ֦ு ิॿΛ͢ΔίϯςφΛΈࠐΉύλʔϯ ྫ) αΠυΧʔproxy Proxy App http://10.200.100.20
http://localhost App Pod
Ξϯόαμύλʔϯ • ֎෦ͷαʔϏεͷհͱͳΔίϯςφΛಉҰPodʹ࣋ͭ ύλʔϯ ྫ) γϟʔσΟϯάΞϯόαμ App Ambassador http://localhost:port shard
#3 shard #2 shard #1 App Pod
Ξμϓλύλʔϯ • ֎෦ͷαʔϏε(ࢹLogging)͔Βͷ൚༻తͳΠϯλʔϑΣ ΠεΛఏڙ͢ΔίϯςφΛΈࠐΉύλʔϯ ྫ) Redis Exporter + Prometheus Redis
Adapter - Exporter EternalService - Prometheus
Workloads Ϧιʔεͱ???
Workloads Ϧιʔε • Pod • ReplicaSet • Deployment • DaemonSet
• StatefulSet • Job • CronJob
Workloads Ϧιʔε • Pod • ReplicaSet • Deployment • DaemonSet
• StatefulSet • Job • CronJob
ReplicaSet ࢦఆ͞ΕͨཧͷϨϓϦΧʹ͢ΔͨΊʹPodͷ࡞ ͱআΛߦ͏Ϧιʔε ྫ) replica = 4
ReplicaSet manifest • Selector spec.template.metadata.label Λࢀর͠ɺReplicaΛੜ͢Δର ͷPodΛબ͢Δɻ ɹ(spec.selector.matchLabelsͱ spec.template.labels͕Ұக͠ͳ͍ɹ ɹ߹ɺError͕ग़ͯ࡞͕Ͱ͖ͳ͍)
• templateԼPodͷmanifestͱҰॹ
Deployment DeploymentReplicaSetͷཧΛ͠ɺϩʔϦϯά ΞοϓσʔτϩʔϧόοΫͳͲͷએݴతͳΞοϓ σʔτػೳΛఏڙ ྫ) replica = 4 (RollingUpdateத) Deployment
New Old
Deployment manifest • ReplicaSetͱಉ༷ • UpdateStrategy(spec.strategy) ʹؔͯ͠লུ
DaemonSet ReplicaSetͷಛघܥ ֤Nodeʹ1ͭͣͭஔ͢ΔͨΊɺReplicaͷࢦఆ ͕Ͱ͖ͳ͍ɻ( ஔͨ͘͠ͳ͍Node͕͋Δ߹ɺ Node Anti-AffinityͰ੍ޚՄೳ)
DaemonSet manifest • ReplicaSetͷΑ͏ͳspec.replica͕ ࢦఆͰ͖ͳ͍͕ɺͦΕҎ֎ಉ༷
StatefulSet ReplicaSetͷಛघܥ εέʔϦϯά(ݮΒ࣌͢1൪େ͖͍ΠϯσοΫε ͔Β)ɺPodͷ࡞(1ͭͣͭॱʹ࡞)ͳͲڍಈʹ ҧ͍͕͋Δɻ [ReplicaSet໊] - [ϥϯμϜͳจࣈྻ] [StatefulSet໊] -
[index൪߸] RepliaSet StatefulSet
StatefulSet manifest • جຊReplicaSetͱҰॹ • spec.serviceNameʹͯservice໊ Λࢦఆ͢Δඞཁ͕͋Δɻ
Replicaͷ࡞ ղ • ΞϓϦέʔγϣϯΛಈ͔͢ࡍɺ DBͱҧ͍ɺॊೈͳΞοϓ σʔτͷઓུΛऔΓ͍ͨɻ (× StatefulSet, DaemonSet) •
ϦιʔεΛߟྀͨ͠Nodeஔ ͕ඞཁʹͳΔɻ (× DaemonSet) ΑͬͯDeploymentΛબ