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.5k
Recap: Securing Kubernetes with Admission Controllers
tksm
2
1.5k
Istio Mutual TLS
tksm
0
700
Debugging Applications in Kubernetes
tksm
16
4.1k
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
カップ麺の待ち時間(3分)でわかるPartyRockアップデート
ryutakondo
0
140
コロプラのオンボーディングを採用から語りたい
colopl
5
1.3k
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
13
2.2k
AWS re:Invent 2024 recap in 20min / JAWSUG 千葉 2025.1.14
shimy
1
100
Goで実践するBFP
hiroyaterui
1
120
商品レコメンドでのexplicit negative feedbackの活用
alpicola
2
370
Cloudflareで実現する AIエージェント ワークフロー基盤
kmd09
0
290
タイミーのデータ活用を支えるdbt Cloud導入とこれから
ttccddtoki
1
160
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
860
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
360
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
12k
FODにおけるホーム画面編成のレコメンド
watarukudo
PRO
2
280
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Producing Creativity
orderedlist
PRO
343
39k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
RailsConf 2023
tenderlove
29
970
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
The Invisible Side of Design
smashingmag
299
50k
How to Ace a Technical Interview
jacobian
276
23k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Typedesign – Prime Four
hannesfritz
40
2.5k
Rails Girls Zürich Keynote
gr2m
94
13k
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