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
APIとはなにか
mikanichinose
0
100
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
540
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
200
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
210
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
120
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
600
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
560
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Optimizing for Happiness
mojombo
376
70k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Writing Fast Ruby
sferik
628
61k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Producing Creativity
orderedlist
PRO
341
39k
Designing Experiences People Love
moore
138
23k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Music & Morning Musume
bryan
46
6.2k
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