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
CyberAgent SGE Engineer
November 02, 2016
Technology
26
16k
kubernetesで変わる開発スタイル 〜マイクロサービスじゃなくてもいいじゃない〜
PHP Conference 2016の発表資料です
kubernetesをつかってゲーム開発の
開発スタイルを変えたお話です
CyberAgent SGE Engineer
November 02, 2016
Tweet
Share
More Decks by CyberAgent SGE Engineer
See All by CyberAgent SGE Engineer
SREチームの立ち上げから5年間とこれから
sgeengineer
0
1.5k
サムザップにおけるNotionの 活用事例とPHPでのNotionAPIを利用した仕組み構築の紹介
sgeengineer
0
1.7k
Laravel OctaneをどうしてもPharで運用したい話
sgeengineer
2
2.2k
大規模Unityゲーム開発の設計事例 〜ドメイン駆動設計とDIコンテナを導入した一年を振り返る〜 / cedec2021-ddd
sgeengineer
2
13k
ロボットを動かすビジュアルプログラミングでできることはPHPでもできる!
sgeengineer
0
1.5k
PHP8版!Swooleのフレームワークを比べてみた
sgeengineer
1
2.4k
「戦国炎舞 -KIZNA-」で行ったAWSのコスト最適化の話
sgeengineer
0
1.6k
AirtestとPocoとOpenSTFによるUnity製スマートフォン向けゲームの実機自動テスト環境構築とその利用方法
sgeengineer
0
4.7k
PHPでgRPCって どこまでいけるの?
sgeengineer
0
4.6k
Other Decks in Technology
See All in Technology
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
430
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
16
3.9k
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
120
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
.NET 9 のパフォーマンス改善
nenonaninu
0
920
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
110
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
160
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
32k
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
260
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
540
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
A Tale of Four Properties
chriscoyier
157
23k
It's Worth the Effort
3n
183
28k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Thoughts on Productivity
jonyablonski
67
4.4k
BBQ
matthewcrist
85
9.4k
Bash Introduction
62gerente
608
210k
Transcript
LVCFSOFUFTͰมΘΔ։ൃελΠϧ גࣜձࣾαΠόʔΤʔδΣϯτɹനҪɹӳ ʙϚΠΫϩαʔϏε͡Όͳ͍͍ͯ͘͡Όͳ͍ʙ QIQDPOQIQDPO
• גࣜձࣾαΠόʔΤʔδΣϯτ • 4(&౷ׅຊ෦ٕज़౷ׅࣨ$50 • നҪɹӳ • ΤϯδχΞ • 5XJUUFS
!HPPEPP • #MPH IUUQBNFCMPKQHPPEPP • %2 ͙ͪ͢Ή '# ϓΫϦϙ ཱྀܳਓ ͓લɺ୭Α
"HFOEB wϚΠΫϩαʔϏεͷ wLVCFSOFUFTʹ͍ͭͯ w͖͋ΒΊͨ͜ͱ wऔΓΜͩ͜ͱ w·ͱΊ
ϚΠΫϩαʔϏεͷ
ϚΠΫϩαʔϏεͷߟ͑ํ https://speakerdeck.com/naoya/serverless-architecture
ϚΠΫϩαʔϏεΛ༻͍ͯ͠Δ ࢥ͍ͭ͘αʔϏεɾɾɾɾ
None
Ҿ༻"CFNB57ͷಈը৴Λࢧ͑ΔαʔόʔαΠυγεςϜ http://bit.ly/2eQYBey "CFNB57ͷશମͷΞʔΩςΫνϟ
(PPHMF$POUBJOFS&OHJOF
ίϯςφͱʁ 04্ʹଞͷϓϩηε͔Βִ͞Εͨ ΞϓϦέʔγϣϯ࣮ߦڥΛߏங͢Δ͜ͱͰɺ Ծతͳಈ࡞ڥΛΑΓগͳ͍ ίϯϐϡʔλϦιʔεͰ࣮ݱ͢Δٕज़ͷ͜ͱͰ͋Δ ˞*5༻ޠࣙయΑΓҾ༻ɿίϯςφٕज़ͱʁ http://www.weblio.jp/content/ίϯςφٕज़ ɾΞϓϦέʔγϣϯίʔυͱͦͷ࣮ߦڥΛ̍ͭʹ·ͱΊΔ ɾϙʔλϒϧɿڥΛ·͍ͨͩσϓϩΠ͕༰қʹͳΔ ɹɹ։ൃڥˠεςʔδϯάڥˠຊ൪ڥ
ɾܰྔɿىಈ͕͍ ɾޮੑɿίϯϐϡʔλϦιʔεΛޮతʹར༻ ΞϓϦέʔγϣϯίʔυ ࣮ߦڥ ίϯςφΠϝʔδ
http://bit.ly/2bNDdqc ίϯςφͷཧ ɾίϯςφؒͷ௨৴ʁ ɾϗετͷαʔό͕མͪͨΒʁ ɾίϯςφͷεέʔϧʁ ɾίϯςφͷোͲ͏͢Δʁ ɾΞϓϦέʔγϣϯͷσϓϩΠʁ ΦʔέετϨʔγϣϯπʔϧ
LVCFSOFUFTʹ͍ͭͯ
ɾίϯςφͷΦʔέετϨʔγϣϯπʔϧ ɾ(PͰ͔͔ΕͨΦʔϓϯιʔε ɾσϓϩΠͷࣗಈԽ ɾΞϓϦέʔγϣϯΛεέʔϦϯά ɾγʔϜϨεʹ৽͍͠ػೳΛల։ ɾϋʔυΣΞͷ༻Λ࠷దԽ LVCFSOFUFTͱʁ
LVCFSOFUFTͷ༻ޠղઆ ɾ/PEF ϫʔΧʔϚγϯ ԾϚγϯ DMVTUFSԼͰཧ͞ΕΔ ɾ/PEF1PPM /PEFͷάϧʔϓ /PEF1PPMຖʹҟͳΔϚγϯλΠϓΛར༻Մೳ ɾDMVTUFS
/PEF /PEF1PPM ΛଋͶͨཧ୯Ґ DMPVE·ͨ͛ͳ͍ Node Node Pool cluster Node Pool Node Pool
LVCFSOFUFTͷ༻ޠղઆ ɾ1PE ίϯςφͷάϧʔϓ ࠷খཧ୯Ґ ɾ%FQMPZNFOU 1PEڥมΛཧ ঢ়ଶΛఆٛ͢Δ ɾ4FSWJDF 1PEͷΤϯυϙΠϯτ
1PEͷΞΫηεϙϦγʔΛཧ Pod Deployment Service
LVCFSOFUFTͷ༻ޠղઆ ɾ*OHSFTT ͍ΘΏΔϩʔυόϥϯαʔ -ͷϩʔυόϥϯαʔΛಁաతʹѻ͏ Πϯλʔωοτ͔Βͷ௨৴Λ ɹ4FSWJDFྲྀ͢ϧʔϧΛهड़ ϗετ໊ɺ63-ύεͰ ɹৼΓ͚Δ͜ͱ͕Մೳ Ingress
B.example.com A.example.com
ؓٳɿ&$4ͱͷ༻ޠൺֱ ECS kubernetes Task Pod Task Definition Deployment Service Service
Instance Node cluster cluster
LVCFSOFUFTͷಛ ɾ1PEͷোੑ Deployment - replicas: 2
LVCFSOFUFTͷಛ ɾ1PEͷোੑ Deployment - replicas: 2
LVCFSOFUFTͷಛ ɾ1PEͷোੑ Deployment - replicas: 2
LVCFSOFUFTͷಛ ɾ1PEͷোੑ Deployment - replicas: 2 ࣗಈͰSFQMJDBΛ̎ʹอͭΑ͏ʹ 1PE͕ੜ͞ΕΔ
LVCFSOFUFTͷಛ ɾ/PEFͷোੑ Deployment - replicas: 2 cluster - NUM_NODES:3
LVCFSOFUFTͷಛ ɾ/PEFͷোੑ Deployment - replicas: 2 cluster - NUM_NODES:3
LVCFSOFUFTͷಛ ɾ/PEFͷোੑ Deployment - replicas: 2 cluster - NUM_NODES:3
/PEF্ͷ1PEӨڹΛड͚Δ
LVCFSOFUFTͷಛ ɾ/PEFͷোੑ Deployment - replicas: 2 cluster - NUM_NODES:3
ࣗಈͰSFQMJDBΛ̎ʹอͭΑ͏ʹ 1PE͕ผͷ/PEF্ʹੜ͞ΕΔ
LVCFSOFUFTͷಛ ɾ/PEFͷোੑ Deployment - replicas: 2 cluster - NUM_NODES:3
/PEF࠶࡞͞ΕΔ
LVCFSOFUFTͷಛ ɾ3PMMJOH6QEBUF Deployment - replicas: 2 - strategy -
type: RollingUpdate ৽͍͠ίϯςφΛద༻͢Δ kubectl apply -f new-deployment.yaml
LVCFSOFUFTͷಛ ɾ3PMMJOH6QEBUF Deployment - replicas: 2 - strategy -
type: RollingUpdate
LVCFSOFUFTͷಛ ɾ3PMMJOH6QEBUF Deployment - replicas: 2 - strategy -
type: RollingUpdate
LVCFSOFUFTͷಛ ɾ3PMMJOH6QEBUF Deployment - replicas: 2 - strategy -
type: RollingUpdate
LVCFSOFUFTͷಛ ɾ3PMMJOH6QEBUF Deployment - replicas: 2 - strategy -
type: RollingUpdate Ұʹ࡞͞ΕΔ1PEͷ ͰௐՄೳ ˞ࠓճఆ .spec.strategy.rollingUpdate.maxSurge
LVCFSOFUFTͷಛ ɾ*OHSFTTͰͷࢄ blue.example.com green.example.com Ingress - rules - host:blue.example.com
- http.paths.backend - serviceName: blue-service - host:green.example.com - http.paths.backend - serviceName: green-service Service - name: blue-service Service - name: green-service
։ൃελΠϧ
ӡ༻ཁ݅ http://bit.ly/2by3DqT ɾຊ൪ڥͱ։ൃڥͷಉҰੑͷ୲อ ɾ%FQMPZ࣌ؒͳΔ͘͘ ɾΞϓϦͷߋ৽શαʔόಉ࣌ʹ ɹ ϒϧʔάϦʔϯσϓϩΠͰՄ ɾແఀࢭӡ༻
͖͋ΒΊͨ͜ͱ
Ҿ༻"CFNB57ͷಈը৴Λࢧ͑ΔαʔόʔαΠυγεςϜ http://bit.ly/2eQYBey ϚΠΫϩαʔϏεԽ Λ͖͋ΒΊͨ
w͍͖ͳΓқ͕ߴ͍ wήʔϜϩδοΫͩͱτϥϯβΫγ ϣϯΛ༻ͯ͠ݫີʹॲཧ͍ͨ͠ ͕࣌͋Δ wϚΠΫϩαʔϏεԽ͠ͳͯ͘ಘ ΒΕΔϝϦοτ͕͋Δ
http://bit.ly/2bP11pg ΞϓϦͷߋ৽Λશαʔόಉ࣌ ʹ͢ΔͷΛ͖͋ΒΊͨ
ࢼͨ͜͠ͱ ɾ*OHSFTTͰͷସ blue.example.com Ingress - rules - host:blue.example.com -
http.paths.backend - serviceName: blue-service Service - name: blue-service
ɾ*OHSFTTͰͷସ blue.example.com Service - name: blue-service Service - name: green-service
ࢼͨ͜͠ͱ Ingress - rules - host:blue.example.com - http.paths.backend - serviceName: blue-service ৽͍͠ίϯςφΛద༻͢Δ kubectl apply -f green-service.yaml
ɾ*OHSFTTͰͷସ blue.example.com Service - name: blue-service Service - name: green-service
ࢼͨ͜͠ͱ Ingress - rules - host:blue.example.com - http.paths.backend - serviceName: green-service *OHSFTTΛߋ৽
Ͳ͏ͳΔ͔ʁ https://youtu.be/Mk-sKSp_oPU
݁Ռɿࣦഊ w͕Ͱͯ͠·ͬͨ wMJWFOFTT1SPCFɺSFBEMJOFTT1SPCFઃఆࡁΈ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: nginx-green
spec: replicas: 3 spec: containers: - name: nginx-green image: nginx ports: - containerPort: 80 livenessProbe: httpGet: path: /index.html port: 80 initialDelaySeconds: 30 timeoutSeconds: 1 readinessProbe: httpGet: path: /index.html port: 80 ˞ઃఆ্͏·͍͖ͦ͘͏Ͱ͕͢ɺͲ͔ؒ͜ҧ͍ͬͯΔͷ͔
ɾ*OHSFTTͰͷସ Service - name: blue-service Service - name: green-service ࢼͨ͜͠ͱ
green.goodoo.tech blue.goodoo.tech Ingress - rules - host:blue.goodoo.tech - http.paths.backend - serviceName: blue-service - host:green.goodoo.tech - http.paths.backend - serviceName: green-service
ɾ*OHSFTTͰͷସ blue.goodoo.tech Service - name: blue-service Service - name: green-service
ࢼͨ͜͠ͱ Ingress - rules - host:blue.goodoo.tech - http.paths.backend - serviceName: green-service - host:green.goodoo.tech - http.paths.backend - serviceName: green-service green.goodoo.tech *OHSFTTΛߋ৽
Ͳ͏ͳΔ͔ʁ https://youtu.be/4NSf-F4VYsY
݁Ռɿ-#͔ͩΒͶ wͰͳ͍Α͏ʹͰ͖ͨ wMJWFOFTT1SPCFɺSFBEMJOFTT1SPCFઃఆࡁΈ wશϦΫΤετ͕ಉ࣌ʹΓସΘΒͳ͔ͬͨ ˞σϞͰ࠶ݱͰ͖·ͤΜͰͨ͠ http://bit.ly/2c4tVlS
ɾ4FSWJDFͰͷସ ࢼͨ͜͠ͱ blue.goodoo.tech Deployment - labels: - app:nginx-blue Deployment
- labels: - app:nginx-green Service - selector - app: nginx-blue Service - selector: - app: nginx-blue
ɾ4FSWJDFͰͷସ ࢼͨ͜͠ͱ blue.goodoo.tech Deployment - labels: - app:nginx-blue Deployment
- labels: - app:nginx-green 4FSWJDFΛߋ৽ Service - selector - app: nginx-green Service - selector: - app: nginx-blue
Ͳ͏ͳΔ͔ʁ https://youtu.be/3ry2auMejKE
݁Ռɿεϐʔυૣ͍ wͰͳ͍ wΓସΘΔҰ൪͔ͬͨ wͨͩ͠ɺશϦΫΤετ͕ಉ࣌ʹΓସΘΒͳ͔ͬͨ ʢΓସΘͬͨޙલͷόʔδϣϯ͕දࣔ͞ΕΔ͕͍࣌ؒʣ http://bit.ly/2bTwRU4
औΓΜͩ͜ͱ
ຊ൪ڥͱ ։ൃڥͷಉҰੑͷ୲อ ͦͷ̍
ಉ͡ίϯςφΛ͏͜ͱͰ ڥͷಉҰੑͷ୲อ
ϩʔΧϧͷ։ൃڥ LVCFSOFUFT NJOJLVCFͰ࣮ݱ yaml ެࣜαΠτͰ Φεεϝ͞Ε͍ͯΔ ϩʔΧϧ
ϩʔΧϧͷ։ൃڥ minikube ϩʔΧϧ1$ ϗετ Service Service - name: mysql-service -
type: NodePort - ports - nodePort: 31101 192.168.99.100 192.168.99.100:31101 ϩʔΧϧ1$͔Β /PEF1PSUͰࢦఆ͞ΕͨϙʔτͰଓՄೳ ˎ7JSUVBM#PY͔ΒׂΒΕΔ mysql -h 192.168.99.100 --port 31101
ίϯςφΦϦδφϧͰͭ͘Βͳ͍ ެࣜΠϝʔδ͔Βͭ͘Δ ίϯςφ࡞ͷઓུ FROM nginx:1.10.1 RUN rm /etc/nginx/conf.d/default.conf ADD ./conf.d/
/etc/nginx/conf.d ADD ./ssl/ /etc/ssl Dockerfile wDPOGΛॻ͖͑Δఔ wϕʔεͷίϯςφͷ࡞ʹίετ Λ͔͚ͳ͍ wϕʔεͷίϯςφͷόʔδϣϯΞ οϓ͕༰қ
*OHSFTTΛ͍͢ ͦͷ
੩తΞυϨεͱυϝΠϯΛ݁ͼ͚ͭͨ͋ͱ ੩తΞυϨεͰ*OHSFTTΛϧʔςΟϯά͍ͨ͠ *OHSFTTͱυϝΠϯ ˞ී௨ͷ͜ͱͰ͕͢ɺ·ͬͨͷͰɾɾɾ λΠϓΛάϩʔόϧʹͯ͠ ੩తΞυϨεΛ༧͢Δ apiVersion: extensions/v1beta1 kind: Ingress
metadata: name: static-ip annotations: kubernetes.io/ingress.global-static-ip-name: gke-phpcon-lb Ingress.yaml BOOPUBUJPOTͰ੩తΞυϨεͷ໊લΛ ࢦఆ͢Δ
ΞϓϦͷόʔδϣϯຖʹαʔόΛΘ͚Δ Service - name: app-v2 Service - name: app-v1 *OHSFTTͰϧʔςΟϯά
goodoo.tech/v1 goodoo.tech/v2 apiVersion: extensions/v1beta1 kind: Ingress metadata: name: routing spec: rules: - host: goodoo.tech http: paths: - path: /v1 backend: serviceName: app-v1 - path: /v2 backend: serviceName: app-v2 Ingress.yaml ϓϩάϥϜʹόʔδϣϯ͚ͷJGจ͕͍Βͳ͍
ແఀࢭ ͦͷ
LVCFSOFUFTࣗମසൟʹ όʔδϣϯ͕͕͋Δ ϲ݄ʹ̍ճϚΠφʔόʔδϣϯ͕͕͋Δʣ όʔδϣϯΞοϓ࣌ μϯλΠϜ͕ൃੜ͢ΔՄೳੑ͕͋Δʂ
/PEF1PPMΛ͏ blue.example.com Service - name: blue-service ແఀࢭͰͷόʔδϣϯΞοϓ Node Pool v1.3
ࢀߟURLɿhttp://qiita.com/superbrothers/items/d9766ebaff15d6954d03
/PEF1PPMΛ͏ blue.example.com Service - name: blue-service ແఀࢭͰͷόʔδϣϯΞοϓ Node Pool v1.3
৽ن/PEF1PPMΛ࡞ gcloud container node-pools create --num-nodes=2 ˞৽ن/PEF1PPM࠷৽ͷόʔδϣϯͰ࡞͞ΕΔ Node Pool v1.4
/PEF1PPMΛ͏ blue.example.com Service - name: blue-service ແఀࢭͰͷόʔδϣϯΞοϓ Node Pool v1.3
ݹ͍όʔδϣϯͷ/PEF1PPMͰ ৽ن1PE͕࡞͞Εͳ͍Α͏ʹ͢Δ DPSEPO kubectl cordon node-pool-v1.3-node1 kubectl cordon node-pool-v1.3-node2 ˞/PEFຖʹࢦఆ͢Δ Node Pool v1.4
/PEF1PPMΛ͏ blue.example.com Service - name: blue-service ແఀࢭͰͷόʔδϣϯΞοϓ Node Pool v1.3
/PEF্ͷ1PEΛҠಈͤ͞Δ ESBJO kubectl drain node-pool-v1.3-node1 ˞/PEFͣͭ Node Pool v1.4 drain
/PEF1PPMΛ͏ blue.example.com Service - name: blue-service ແఀࢭͰͷόʔδϣϯΞοϓ Node Pool v1.3
/PEF্ͷ1PEΛҠಈͤ͞Δ ESBJO kubectl drain node-pool-v1.3-node2 ˞/PEFͣͭ Node Pool v1.4 drain drain
/PEF1PPMΛ͏ blue.example.com Service - name: blue-service ແఀࢭͰͷόʔδϣϯΞοϓ Node Pool v1.3
࠷ޙʹݹ͍όʔδϣϯͷ /PEF1PPMΛআ͢Δ gcloud container node-pools delete node-pool-v1.3 Node Pool v1.4
/PEF1PPMΛ͏ blue.example.com Service - name: blue-service ແఀࢭͰͷόʔδϣϯΞοϓ όʔδϣϯΞοϓྃ Node Pool
v1.4
ϋʔυΣΞϦιʔεͷ ࠷దԽ ͦͷ
͍͘ΒίϯςφΛ͏ͱ͍ͬͯ /PEFΛීஈ༨ΒͤΔͷ͍ͬͨͳ͍ goodoo.tech Service - name: app-v1 ͬͯͳͯ͘༨͍ͬͯΔ
1PEͰඞཁͳ͚ͩͷ/PEFͰӡ༻͢Δ 1PEʹඞཁͳ͚ͩͷ/PEFʹ͢Δͱ ৽͍͠ίϯςφΛσϓϩΠ࣌ʹ /PEF͕ͨΒͳͯ͘ࠔΔ goodoo.tech Service - name: app-v1
σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ NUM_NODES=4 NUM_NODES=4 goodoo.tech Service - name: app-v1 gcloud
container clusters resize cluster-name --size 4
৽͍͠ίϯςφΛσϓϩΠ NUM_NODES=4 goodoo.tech Service - name: app-v1 Service - name:
app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏
*OHSFTTͰସ ϒϧʔάϦʔϯ NUM_NODES=4 goodoo.tech Service - name: app-v1 Service -
name: app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏
ݹ͍όʔδϣϯͷίϯςφΛআ NUM_NODES=4 goodoo.tech Service - name: app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏
NUM_NODES=2 goodoo.tech Service - name: app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ ࠷ޙʹ/PEFΛͲ͢ gcloud
container clusters resize cluster-name --size 2
NUM_NODES=2 goodoo.tech Service - name: app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ ͋ʂ 502
NUM_NODES=2 goodoo.tech Service - name: app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ 1PEͷ࠶࡞͕͠Δ
NUM_NODES=2 goodoo.tech Service - name: app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ SFTJ[Fʹফ͢/PEF͕ࢦఆͰ͖ͳ͍
Ͳ͏͢Ε͍͍ͷʁ http://bit.ly/2bNDdqc
/PEF1PPMΛ͏ Node Pool app-v1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ goodoo.tech Service - name:
app-v1
Node Pool app-v1 Node Pool app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ ৽͍͠ίϯςφ༻ͷ /PEF1PPMΛ࡞͢Δ
goodoo.tech Service - name: app-v1 gcloud container node-pools create --num-nodes=2 --node-labels=app-v1.1
Node Pool app-v1 Node Pool app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ goodoo.tech Service
- name: app-v1 ৽͍͠ίϯςφΛσϓϩΠ Service - name: app-v1.1
Node Pool app-v1 Node Pool app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ goodoo.tech Service
- name: app-v1 Service - name: app-v1.1 *OHSFTTͰସ ϒϧʔάϦʔϯ
Node Pool app-v1 Node Pool app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ goodoo.tech Service
- name: app-v1.1 ݹ͍όʔδϣϯͷίϯςφΛআ
Node Pool app-v1 Node Pool app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ goodoo.tech Service
- name: app-v1.1 /PEF1PPMΛআ gcloud container node-pools delete node-pool-app-v1
Node Pool app-v1.1 σϓϩΠ͚࣌ͩ/PEFΛεέʔϧͤ͞Α͏ goodoo.tech Service - name: app-v1.1
ྃʂ
ཧମܥ ͦͷ
cluster production.goodoo.tech Service - name: staging DMVTUFSڥຖʹΘ͚Δ EFW TUBHJOH QSPEVDUJPO
Service - name: production production staging staging.goodoo.tech dev.goodoo.tech dev Service - name: dev ˞/BNFTQBDF͑Δ͕ࠓճ͔ͭΘͳ͍
ΞϓϦͷόʔδϣϯຖʹΘ͚Δ Service - name: app-v2 Service - name: app-v1 NodePool
goodoo.tech/v1 goodoo.tech/v2 Node Pool app-v2 Node Pool app-v1 ϒϧʔάϦʔϯσϓϩΠ࣌ ͷϚΠφʔόʔδϣϯ͕ ͕͋Δͱ͖ಉ༷
·ͱΊ
wϚΠΫϩαʔϏεԽ͖͋ΒΊͨ wͦΕͰLVCFSOFUFTͷϝϦοτ ΛڗडͰ͖Δ ຊ൪ڥͱ։ൃڥͷಉҰੑͷ୲อ ແఀࢭӡ༻ ϋʔυΣΞͷ࠷దԽ wLVCFSOFUFT͍͍Α
w 4FSWFSMFTT"SDIJUFDUVSF - https://speakerdeck.com/naoya/serverless-architecture w "CFNB57ͷಈը৴Λࢧ͑ΔαʔόʔαΠυγεςϜ - http://www.slideshare.net/yuichironakazawa2/abematv w XFCσβΠφʔϓϩάϥϚͷͨΊͷ%PDLFSೖ
- https://docs.com/asashiho/4719/web-docker w (,&!"CFNB57 - https://speakerdeck.com/strsk8/gke-at-abematv w Google Container Engine Ͱ৽͍͠ϊʔυʹμϯλΠϜθϩͰҠߦ͢Δ - http://qiita.com/superbrothers/items/d9766ebaff15d6954d03 ࢀߟจݙ XFC
w (,&Ͱӡ༻ͯ͠Έͨ - http://www.slideshare.net/katsutoshinagaoka/gke-57322091 w ,VCFSOFUFT5IF-BUFTUBOE(SFBUFTU - https://speakerdeck.com/ianlewis/kubernetes-the-latest-and-greatest w ,VCFSOFUFT6QEBUF!($16('VLVPLB
- https://speakerdeck.com/ianlewis/kubernetes-1-dot-4-update-at- gcpug-fukuoka-number-4 ࢀߟจݙ XFC
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠
None