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
1
290
Lecture__1.pdf
ry
February 10, 2020
Tweet
Share
More Decks by ry
See All by ry
eBPF Tools on Kubernetes part1
ry
0
220
Vault Secrets Operator Tutorial
ry
0
470
KyvernoとRed Hat ACMを用いたマルチクラスターの一元的なポリシー制御
ry
0
970
明日から始められるKyvernoを用いたポリシー制御
ry
3
710
CNDT2022 k8snovice Community introduction
ry
0
120
Policy Engine on Kubernetes
ry
1
1.3k
ConfigMap and Secret
ry
0
320
Policy Manager試してみた!
ry
0
380
Kubernetes APIに Pod内からアクセスしてみた
ry
1
1.6k
Other Decks in Education
See All in Education
Ch2_-_Partie_2.pdf
bernhardsvt
0
130
お仕事図鑑pitchトーク
tetsuyaooooo
0
2.3k
Zero to Hero
takesection
0
160
HCL Notes/Domino 14.5 EAP Drop1
harunakano
1
160
1113
cbtlibrary
0
290
BrightonSEO, San Diego, CA 2024
mchowning
0
130
Web 2.0 Patterns and Technologies - Lecture 8 - Web Technologies (1019888BNR)
signer
PRO
0
2.5k
Use Cases and Course Review - Lecture 8 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
870
Semantic Web and Web 3.0 - Lecture 9 - Web Technologies (1019888BNR)
signer
PRO
2
2.7k
1106
cbtlibrary
0
450
SAT Bootcamp and Course
syedmahadd
0
150
Bitcoin Lightning Network en pratique
rlifchitz
0
110
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
Designing Experiences People Love
moore
140
23k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
550
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Producing Creativity
orderedlist
PRO
344
39k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Site-Speed That Sticks
csswizardry
4
380
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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Λબ