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
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
990
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
いざ、BSC討伐の旅
nikinusu
2
780
Lexical Analysis
shigashiyama
1
150
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.2k
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Facilitating Awesome Meetings
lara
50
6.1k
How GitHub (no longer) Works
holman
310
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Building Adaptive Systems
keathley
38
2.3k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
KATA
mclloyd
29
14k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
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!