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
Kubernetes を利用したデプロイ自動化基盤
Search
ktr
May 20, 2017
Technology
0
890
Kubernetes を利用したデプロイ自動化基盤
ktr
May 20, 2017
Tweet
Share
More Decks by ktr
See All by ktr
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
0
68
Designing libraries in Go way
ktr_0731
6
1.5k
Go Modules and Proxy Walkthrough
ktr_0731
8
27k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
180
Fuzzy finder as a Go library
ktr_0731
3
5.7k
つよくてニューゲーム / NewGame++
ktr_0731
0
940
やはり俺の Go アプリケーション設計はまちがっている。 / My Go Application Design Is Wrong, As I Expected
ktr_0731
13
3.5k
GopherCon2018
ktr_0731
2
1.8k
Evans: more expressive gRPC client
ktr_0731
2
450
Other Decks in Technology
See All in Technology
Lexical Analysis
shigashiyama
1
150
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
9
1.1k
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
140
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
300
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
アプリエンジニアのためのGraphQL入門.pdf
spycwolf
0
100
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
複雑なState管理からの脱却
sansantech
PRO
1
150
Featured
See All Featured
Faster Mobile Websites
deanohume
305
30k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Designing Experiences People Love
moore
138
23k
Facilitating Awesome Meetings
lara
50
6.1k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Navigating Team Friction
lara
183
14k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Docker and Python
trallard
40
3.1k
Transcript
Kubernetes Λͬͨ σϓϩΠࣗಈԽج൫ @A(izu)LT ձฤ 0x02
$ whoami • ੨ଠ (@ktr_0731) • ρ s123 • Web
• STEINS;GATEɺڹ͚ʂϢʔϑΥχΞϜ
ڥ • ਓ͕͋·Γଟ͘ͳ͍ձࣾ • WebɺαʔόɺϞόΠϧ͝ͱʹϦϙδτϦ͕ ͔Ε͍ͯΔ • खಈϏϧυɾσϓϩΠ
ڥ • ਓ͕͋·Γଟ͘ͳ͍ձࣾ • WebɺαʔόɺϞόΠϧ͝ͱʹϦϙδτϦ͕ ͔Ε͍ͯΔ • खಈϏϧυɾσϓϩΠ
ڥ • ਓ͕͋·Γଟ͘ͳ͍ձࣾ • WebɺαʔόɺϞόΠϧ͝ͱʹϦϙδτϦ͕ ͔Ε͍ͯΔ • खಈσϓϩΠ
ςετڥͷσϓϩΠ ʹ͕͔͔࣌ؒΔ
ςετڥͷσϓϩΠ ʹ͕͔͔࣌ؒΔ ↓ ࣗಈԽͷඞཁੑ
ཁૉ • Slack Bot • CI αʔό • Docker •
Kubernetes
Docker • (େࡶʹ͍͏ͱ) ڥΛίϯςφԽ͢Δٕज़ • Docker ΠϝʔδʹΞϓϦέʔγϣϯΛೖΕͯ ଞʹґଘΛٴ΅ͣ͞ʹಈ͔ͤΔ • Immutable
Infrastructure
• a.k.a. k8s • Docker ίϯςφͷΦʔέετϨʔγϣϯπʔϧ • ΫϥελϦϯά • ίϯςφ܈ͷىಈɺఀࢭɺϨϓϦέʔγϣϯ
• 1ͭҎ্ͷ Docker Πϝʔδ͔Β Pod Λ࡞ • ֤ Node ʹࢄͯ͠ஔ
• namespace ͰڥΛ͚Δ͜ͱ͕Ͱ͖Δ • ͲͷڥʹσϓϩΠ͢Δ͔ߟ͑Δඞཁ͕ͳ͍
• namespace ͰڥΛ͚Δ͜ͱ͕Ͱ͖Δ • ͲͷڥʹσϓϩΠ͢Δ͔ߟ͑Δඞཁ͕ͳ͍ • Ͳ͜Ͱಈ͍͍ͯΔ͔ߟ͑ͳͯ͘ྑ͍
• namespace ͰڥΛ͚Δ͜ͱ͕Ͱ͖Δ • ͲͷڥʹσϓϩΠ͢Δ͔ߟ͑Δඞཁ͕ͳ͍ • Ͳ͜Ͱಈ͍͍ͯΔ͔ߟ͑ͳͯ͘ྑ͍ • Ͳ͏ಈ͍͍ͯΔ͔͚ͩߟ͑Εྑ͍
αʔϏεͷެ։ apiVersion: v1 kind: Service metadata: name: sample-server labels: name:
sample-server spec: type: LoadBalancer ports: - port: 80 protocol: TCP targetPort: 8080 selector: name: sample-server
αʔϏεͷެ։ • type=LoadBalancer Ͱ LB ͕࡞͞ΕɺΞϓ Ϧέʔγϣϯ͕ެ։͞ΕΔ • AWS ͳͲͷαϙʔτ͞ΕͨҰ෦ͷΈ
• kubernetes/ingress
σϓϩΠʹඞཁͳઃఆϑΝΠϧ • service.yaml (͖ͬ͞ͷઃఆ) • deployment.yaml • ϨϓϦΧͷࢦఆ • Pod
ͷߏͷهड़
$ kubectl create -n test -f service.yaml $ kubectl create
-n test -f deployment.yaml
ཁૉ • Slack Bot • CI αʔό • Docker •
Kubernetes
Slack Bot • ChatOps • ୭ͰςετڥʹσϓϩΠ͕Ͱ͖Δ
None
Ұ࿈ͷྲྀΕ • Bot ʹσϓϩΠΛ͑Δ • CI ͕σϓϩΠϞʔυͰಈ͘ • CI ্Ͱ
Kubernetes ͷσϓϩΠεΫϦϓτ Λ࣮ߦ • σϓϩΠྃ
Ұ࿈ͷྲྀΕ • Bot ʹσϓϩΠΛ͑Δ • CI ͕σϓϩΠϞʔυͰಈ͘ • CI ্Ͱ
Kubernetes ͷσϓϩΠεΫϦϓτ Λ࣮ߦ • σϓϩΠྃ
՝ • ݱࡏςετڥͷΈͷ༻ • ͍ͣΕϓϩμΫγϣϯڥͰ͍͍ͨ • ݟ͕ཷ·͍ͬͯͳ͍ • k8s ͷجຊ֓೦Δඞཁ͕͋Δ
·ͱΊ • Kubernetes • ෳͷಠཱͨ͠ڥΛ࡞Ͱ͖Δ • Ͳ͜Ͱಈ͍͍ͯΔ͔Λߟ͑ͣʹࡁΉ • k8s ͰσϓϩΠ͕ࣗಈͰͰ͖ΔΑ͏ʹͳͬͨ
ࢀߟ • https://speakerdeck.com/koudaiii/number- devsumie • Wantedly TechBook #2
Thanks for your attention!