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.5k
Unit Testing for Prometheus Rules
tksm
6
2.7k
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
660
Debugging Applications in Kubernetes
tksm
16
4k
Kubernetes with Prometheus
tksm
5
2.4k
Kubernetes v1.7 の主な変更点 / Kubernetes v1.7 features
tksm
0
1.5k
Prometheus による Kubernetes モニタリングの基礎 / Kubernetes monitoring with Prometheus
tksm
2
2.9k
Other Decks in Technology
See All in Technology
【shownet.conf_】放送局とShowNetが共創する、未来の放送システム ~Media over IP 特別企画の裏側~
shownet
PRO
0
270
山手線一周のパフォーマンス改善
suzukahr
0
110
Valuable Software Engineering
avandeursen
0
250
10Xでのデータ基盤の変遷とこれから: データマネジメントのリアル 〜BtoB企業3社の歩みとこれから〜
10xinc
6
1.2k
Hazard pointers with reference counter
ennael
PRO
0
110
エンジニアは伝え方が9割/90% of what engineers need is communication skills
ykanoh
2
160
ドメインと向き合う - 旅行予約編
hidenorigoto
4
530
CVE alive
ennael
PRO
0
370
低コストで実現する社内文書RAG機能を搭載したAIチャットボット開発
takapy
3
590
Product Utilization of Large Language Models Starting Today
ymatsuwitter
3
720
Authenticator のエミュレーションによる パスキーのログインテスト/nikkei-tech-talk-25
nikkei_engineer_recruiting
0
140
Oracle GoldenGate 23ai 導入Tips
oracle4engineer
PRO
1
210
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
65
9.9k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
2
210
Web development in the modern age
philhawksworth
205
10k
Testing 201, or: Great Expectations
jmmastey
38
7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
125
18k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
6
230
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Unsuck your backbone
ammeep
667
57k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Designing on Purpose - Digital PM Summit 2013
jponch
114
6.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