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.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
670
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
3
3k
Other Decks in Technology
See All in Technology
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
4
4.6k
生成AIと知識グラフの相互利用に基づく文書解析
koujikozaki
1
140
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.6k
使えそうで使われないCloudHSM
maikamibayashi
0
170
Gradle: The Build System That Loves To Hate You
aurimas
2
150
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
500
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
290k
Datachain会社紹介資料(2024年11月) / Company Deck
datachain
3
16k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Building an army of robots
kneath
302
42k
Agile that works and the tools we love
rasmusluckow
327
21k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Become a Pro
speakerdeck
PRO
24
5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
What's in a price? How to price your products and services
michaelherold
243
12k
It's Worth the Effort
3n
183
27k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
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