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
kubectl apply の仕組み / How kubectl apply works
Search
Takashi Kusumi
June 26, 2017
Technology
1
9.7k
kubectl apply の仕組み / How kubectl apply works
Kubernetes Meetup Tokyo #5
2017.06.27
https://k8sjp.connpass.com/event/56945/
Takashi Kusumi
June 26, 2017
Tweet
Share
More Decks by Takashi Kusumi
See All by Takashi Kusumi
Recap: eBPF セッションつまみ食い / eBPF sessions @ KubeCon EU 2023
tksm
1
3.6k
Unit Testing for Prometheus Rules
tksm
6
2.8k
Z Lab の教育への取組 / Cloud Native Education Efforts at Z Lab
tksm
7
1.4k
Recap: Securing Kubernetes with Admission Controllers
tksm
2
1.5k
Istio Mutual TLS
tksm
0
690
Debugging Applications in Kubernetes
tksm
16
4k
Kubernetes with Prometheus
tksm
5
2.4k
Kubernetes v1.7 の主な変更点 / Kubernetes v1.7 features
tksm
0
1.6k
Prometheus による Kubernetes モニタリングの基礎 / Kubernetes monitoring with Prometheus
tksm
3
3k
Other Decks in Technology
See All in Technology
Wantedly での Datadog 活用事例
bgpat
1
410
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
150
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
Qiita埋め込み用スライド
naoki_0531
0
860
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
300
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
180
ハイテク休憩
sat
PRO
2
120
なぜCodeceptJSを選んだか
goataka
0
150
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
Featured
See All Featured
A designer walks into a library…
pauljervisheath
204
24k
A Philosophy of Restraint
colly
203
16k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Rails Girls Zürich Keynote
gr2m
94
13k
Automating Front-end Workflow
addyosmani
1366
200k
What's in a price? How to price your products and services
michaelherold
243
12k
Bash Introduction
62gerente
608
210k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Transcript
LVCFDUMBQQMZך➬穈 5BLBTIJ,VTVNJ ;-BC
LVCFDUMBQQMZהכ Ӝ ؔـآؙؑزָ㶷㖈׃זֽל⡲䧭 1045 ծ㶷㖈ׅל䊴ⴓ 1"5$) 僥׃גֻ⤑ⵃז؟ـ؝وٝس وصؿؑأزח״㹑鎉涸 EFDMBSBUJWF ז盖椚ָ〳腉
Ӝ ⽃秪ז♳剅ֹדכזֻծ䊴ⴓ僥דֿ֮הח岣䠐 LVCFDUMSFQMBDFכ⽃秪ז♳剅ֹ 165 Ӝ 䊴ⴓכLVCFDUM⩎ד鎘皾ׁ
➭ך؟ـ؝وٝسהך麩ְ ؟ـ؝وٝس ؔـآؙؑزָ㶷㖈׃זְ ؔـآؙؑزָ㶷㖈ׅ BQQMZ 倜鋉⡲䧭 1045 䊴ⴓ僥 1"5$)
˟ DSFBUF 倜鋉⡲䧭 1045 ⚠ؒٓ٦ SFQMBDF ⚠ؒٓ٦ ♳剅ֹ 165 QBUDI ⚠ؒٓ٦ 䊴ⴓ僥 1"5$) EFMFUF ⚠ؒٓ٦ ꤐ %&-&5& ˟QSVOF⢪㜥さ%&-&5&֮䖤
㹑鎉涸 EFDMBSBUJWF ؔـآؙؑز盖椚 Ӝ BQQMZח״وصؿؑأز纇 㹑鎉 ֽח״盖椚ָדֹ Ӝ ؔـآؙؑزך僥כLVCFDUMBQQMZGDPOHֽ Ӝ
QSVOF⢪ִלꤐ荈⹛ד遤ִ BMQIB堣腉 Ӝ 鑫稢כⰕ䒭سًُؗٝز撑 ,VCFSOFUFT0CKFDU.BOBHFNFOU ZBNM
BQQMZך䊴ⴓ僥
㉏겗ٖفٔؕ侧כוֲז apiVersion: extensions/v1beta1 kind: Deployment metadata: name: myapp1
spec: # レプリカ数を指定しない template: metadata: labels: run: myapp1 spec: containers: - image: nginx name: myapp1
㉏겗ٖفٔؕ侧כוֲז Ӝ ٖفٔؕ侧䭷㹀ׇ׆EFQMPZNFOUBQQMZׅ LVCFDUMBQQMZGNZBQQEFQZBNM Ӝ TDBMF؝وٝسדؔـآؙؑزךٖفٔؕ侧ח㢌刿 LVCFDUMTDBMFSFQMJDBTEFQMPZNZBQQ Ӝ ずׄوصؿؑأزⱄ䏝BQQMZׅ
LVCFDUMBQQMZGNZBQQEFQZBNM
瘶ִٖفٔؕ侧כךתתחז
㉏겗ٖفٔؕ侧כוֲז apiVersion: extensions/v1beta1 kind: Deployment metadata: name: myapp2
spec: replicas: 3 # レプリカ数を指定 template: metadata: labels: run: myapp2 spec: containers: - image: nginx name: myapp2
㉏겗ٖفٔؕ侧כוֲז Ӝ ٖفٔؕ侧ח䭷㹀׃EFQMPZNFOUBQQMZׅ LVCFDUMBQQMZGNZBQQEFQZBNM Ӝ TDBMF؝وٝسדؔـآؙؑزךٖفٔؕ侧ח㢌刿 LVCFDUMTDBMFSFQMJDBTEFQMPZNZBQQ Ӝ وصؿؑأزַٖفٔؕ侧ך鎸鶢չꤐպ׃גBQQMZׅ
LVCFDUMBQQMZGNZBQQEFQZBNM չEFQMPZNFOUTQFDSFQMJDBTպ荈⡤ך鎸鶢ꤐ
瘶ִٖفٔؕ侧כחז
䊴ⴓ鎘皾 ꤐⴓך鎘皾 ➙㔐ךوصؿؑأزה㔐BQQMZ׃وصؿؑأز嫰鯰׃ג ꤐׁؿ؍٦ٕس鎘皾ׅ 㔐ⴓכMBTUBQQMJFEDPOHVSBUJPOהְֲ،ظذ٦ءّٝח ⥂㶷ׁגְ 鷄⸇٥㢌刿ⴓך鎘皾
➙㔐ךوصؿؑأزה植㖈ךؔـآؙؑز嫰鯰׃ג鷄⸇٥㢌 刿ⴓ鎘皾ׅ
ػحثה׃ג鷏⥋ׁ { "metadata": { "annotations": { "kubectl.kubernetes.io/last-applied-configuration": "..." }
}, "spec": { "replicas": null } } curl -XPATCH -H "Content-Type: application/strategic-merge-patch+json" ... https://.../apis/extensions/v1beta1/namespaces/default/deployments/myapp https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md
ֿך➬穈ח״ًٔحز Ӝ وصؿؑأزח剅ַגְזְؿ؍٦ٕسכ⥂䭯ׁג刿倜 )PSJ[POUBM1PE"VUPTDBMFSך״ֲז➬穈ה湱䚍ָ葺ְ Ӝ وصؿؑأزַչꤐպ׃הְֲ䞔㜠僥ׇׁ Ӝ 鶢ך㉏겗כ剑ⴱַٖفٔؕ侧剅ַזֽלծLVCFDUM TDBMFד㢌刿׃⦼ךתת⥂䭯ׁ
תה Ӝ BQQMZכ♳剅ֹדכזֻ䊴ⴓ僥 Ӝ 䊴ⴓ鎘皾כչꤐⴓպהչ鷄⸇٥㢌刿ⴓպד嫰鯰㼎韋ָ殯ז 㔐ךوصؿؑأزָ،ظذ٦ءّٝה׃ג⥂㶷ׁגְ Ӝ 鑫׃ֻכ⟃♴ךⰕ䒭سًُؗٝز撑 %FDMBSBUJWF.BOBHFNFOUPG,VCFSOFUFT0CKFDUT6TJOH $POHVSBUJPO'JMFT
8FBSFIJSJOH CJUMZ[MBCDBSFFST