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
940
Kubernetes を利用したデプロイ自動化基盤
ktr
May 20, 2017
Tweet
Share
More Decks by ktr
See All by ktr
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
9.5k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
190
Designing libraries in Go way
ktr_0731
7
1.5k
Go Modules and Proxy Walkthrough
ktr_0731
8
27k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
210
Fuzzy finder as a Go library
ktr_0731
3
5.9k
つよくてニューゲーム / NewGame++
ktr_0731
0
1k
やはり俺の Go アプリケーション設計はまちがっている。 / My Go Application Design Is Wrong, As I Expected
ktr_0731
13
3.6k
GopherCon2018
ktr_0731
2
1.8k
Other Decks in Technology
See All in Technology
Yamla: Rustでつくるリアルタイム性を追求した機械学習基盤 / Yamla: A Rust-Based Machine Learning Platform Pursuing Real-Time Capabilities
lycorptech_jp
PRO
4
180
Amazon S3標準/ S3 Tables/S3 Express One Zoneを使ったログ分析
shigeruoda
5
590
SpringBoot x TestContainerで実現するポータブル自動結合テスト
demaecan
0
120
Geminiとv0による高速プロトタイピング
shinya337
0
200
5min GuardDuty Extended Threat Detection EKS
takakuni
0
180
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
250
asken AI勉強会(Android)
tadashi_sato
0
140
Witchcraft for Memory
pocke
1
670
生まれ変わった AWS Security Hub (Preview) を紹介 #reInforce_osaka / reInforce New Security Hub
masahirokawahara
0
370
生成AI時代の開発組織・技術・プロセス 〜 ログラスの挑戦と考察 〜
itohiro73
1
380
AI専用のリンターを作る #yumemi_patch
bengo4com
4
2.1k
Tech-Verse 2025 Global CTO Session
lycorptech_jp
PRO
0
1.2k
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Code Review Best Practice
trishagee
69
18k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Raft: Consensus for Rubyists
vanstee
140
7k
Become a Pro
speakerdeck
PRO
28
5.4k
Building Applications with DynamoDB
mza
95
6.5k
Building an army of robots
kneath
306
45k
Visualization
eitanlees
146
16k
Agile that works and the tools we love
rasmusluckow
329
21k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Balancing Empowerment & Direction
lara
1
390
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!