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
Write Kubernetes CustomController in Go
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
moricho
December 04, 2019
Programming
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Write Kubernetes CustomController in Go
moricho
December 04, 2019
More Decks by moricho
See All by moricho
Enhance Kubernetes Security with Gatekeeper
moricho
3
1.1k
Deep Dive into Runtime Shim
moricho
3
2.4k
Recap: Zero Trust Service Mesh with Calico, SPIRE, and Envoy
moricho
1
1.2k
gVisorで実現するこれからのコンテナセキュリティ
moricho
6
5.1k
Deep dive into sync.Pool
moricho
2
1.3k
Other Decks in Programming
See All in Programming
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
300
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
140
FDEが実現するAI駆動経営の現在地
gonta
2
270
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
430
メールのエイリアス機能を履き違えない
isshinfunada
0
230
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
160
Go 1.27 における memory allocation の高速化
andpad
0
110
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
460
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.4k
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.2k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Discover your Explorer Soul
emna__ayadi
2
1.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
530
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
270
Building the Perfect Custom Keyboard
takai
2
830
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
340
Transcript
Write Kubernetes CustomController in Go golang.tokyo #28 Dec.4
None
OVERVIEW golang.tokyo #28 Dec.4 ɾk8sͷ༻ޠͷ͓͞Β͍ ɾcontroller-runtimeΛ࣮ͬͨ ɾk8sͷControllerͱʁ
k8sͷ͓͞Β͍ ɾPod : ϫʔΫϩʔυͷ࠷খ୯Ґ ex. Goίϯςφ(API) + fluentdίϯςφ(logging) ɾReplicaSet :
͋ΔPodͷू߹
k8sͷControllerͱʁ k8sManifest(yaml)Ͱ·͍͠ঢ়ଶΛએݴ => ͦͷঢ়ଶΛҡ࣋͠ଓ͚Δ ref) Operator Basic in CNDK2019 -
speakerdeck
k8sͷControllerͱʁ
k8sͷControllerͱʁ
k8sͷControllerͱʁ
k8sͷControllerͱʁ k8s෦Ͱ͜ͷॲཧΛ ܁Γฦ͍ͯ͠Δ => ͋Δ͖ঢ়ଶͱ ɹ ݱࡏͷঢ়ଶΛ߹ΘͤΔ
CustomController controllerࣗલͰ࡞Δ͜ͱͰ͖Δ => ͦΕ͕CustomController kubernetes-sigs/controller-runtime ͱ͍͏ϥΠϒϥϦ͕ఏڙ͞Ε͍ͯΔ
controller-runtimeΛ ࣮ͬͨ ࠓճͷαϯϓϧɿ ReplicaSet͕࡞͞ΕͨΒɺ ͦͷཧԼͷίϯςφ໊Λදࣔ͢Δ ίϯτϩʔϥʔ
controller-runtimeΛ ࣮ͬͨ (controller.go) ͲͷϦιʔεΛऔಘͯ͠ɺͲ͏͍͏ॲཧΛ࣮ߦ͢Δ͔ ɾ Reconciler ɾ
controller-runtimeΛ ࣮ͬͨ (controller.go) Namespace, Ϧιʔε(ReplicaSet)Λࢦఆͯ͠ɺ ϦιʔεͷใΛऔಘɺίϯςφ໊Λग़ྗ ɾ
controller-runtimeΛ ࣮ͬͨ (main.go) ControllerΛੜ ɾ ઌ΄Ͳఆٛͨ͠ReconcilerΛࢦఆ ɾ
controller-runtimeΛ ࣮ͬͨ (main.go) ɾࢦఆͨ͠ϦιʔεΛControllerͰࢹ ɾ ɾReplicaSetʹߋ৽͕͋ͬͨΒɺઌ΄ͲͷॲཧΛ࣮ߦ
controller-runtimeΛ ࣮ͬͨ ReplicaSetΛ࡞ͨ͠Βɺ ͦͷཧԼͷίϯςφͷ໊લ͕ දࣔ͞Εͨ 70ߦ͘Β͍Ͱ؆୯ʹॻ͚ͨ
࣮༻తͳControllerΛ࡞͍͖͍ͬͯͨ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ