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
Level Triggered and Reconciled: How Kubernetes ...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
James Bowes
May 16, 2018
Technology
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Level Triggered and Reconciled: How Kubernetes Manages its State
James Bowes
May 16, 2018
More Decks by James Bowes
See All by James Bowes
Write Once, Compile Lots, Run Anywhere
jbowes
0
210
A Token Of Respect: Implementing Microservice Identity And Access Management In Go
jbowes
0
250
Shattered Mirror: An Introduction to Reflect and Unsafe
jbowes
0
50
Shattered Mirror: An Introduction to Reflect and Unsafe
jbowes
0
1.4k
Cloud Jumping With Kubernetes
jbowes
0
100
Building APIs for an unreliable world
jbowes
0
62
API Design Lessons From Kubernetes
jbowes
0
97
CL_Eye-Catching_User_Interfaces.pdf
jbowes
0
52
Higher-Order Deployments: Reducing Boilerplate With Kubernetes Custom Resource Definitions
jbowes
0
55
Other Decks in Technology
See All in Technology
ITエンジニアを取り巻く環境とキャリアパス / A career path for Japanese IT engineers
takatama
4
1.8k
AIプラットフォームを運用し続けるための可観測性
tanimuyk
4
1.1k
サプライチェーンセキュリティの空白地帯 - 信頼できる”依存性”の未来を考える
rung
PRO
2
700
タクシーアプリ『GO』の実践的データ活用
mot_techtalk
2
150
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
190
運用を見据えたAIエージェント設計実践
amacbee
1
2.9k
ルールやカスタム機能、どう使う?理想の出力を引き出すために今知りたいIBM Bob 5つの機能
muehara
1
340
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
1.2k
AIを「創る」と「使う」の循環 — HRテックが実践するリアルなAI組織実装
taketo957
0
1.5k
Cloud Run のアップデート 触ってみる&紹介
gre212
0
320
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
140
Ruby::Boxでできること、Refinementsでできること
joker1007
3
390
Featured
See All Featured
The Language of Interfaces
destraynor
162
27k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
How to Talk to Developers About Accessibility
jct
2
220
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
830
YesSQL, Process and Tooling at Scale
rocio
174
15k
Bash Introduction
62gerente
615
210k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Ruling the World: When Life Gets Gamed
codingconduct
0
250
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
600
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
570
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Transcript
@jrbowes Level-Triggered and Reconciled How Kubernetes Manages its State
@jrbowes @jrbowes Photo by Stefan Steinbauer on Unsplash STUDY TIME
@jrbowes https://www.manifold.co Say hi at our booth! James Bowes Technical
Lead
@jrbowes @jrbowes Photo by Maximilian Weisbecker on Unsplash KUBERNETES?
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes Photo by Gamze Bozkaya on Unsplash THE CLIENT
API
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes Photo by Jakob Owens on Unsplash PATCHING
@jrbowes JSON Merge Patch • Plain JSON document only containing
changes • Declarative and simple • RFC 7386
@jrbowes JSON Merge Patch ... metadata: labels: service: worker app:
marketplace spec: containers: - image: manifold/worker:1.31.18 name: worker
@jrbowes JSON Merge Patch metadata: labels: service: billing-worker spec: containers:
- image: manifold/sidecar:1.0.0 name: metrics
@jrbowes JSON Merge Patch ... metadata: labels: service: billing-worker app:
marketplace spec: containers: - image: manifold/sidecar:1.0.0 name: metrics
@jrbowes JSON Merge Patch ... metadata: labels: service: billing-worker app:
marketplace spec: containers: - image: manifold/sidecar:1.0.0 name: metrics
@jrbowes JSON Merge Patch • Objects are always merged •
Arrays are always replaced • No explicit null See also JSON Patch (RFC 6902) - Verbose and complex
@jrbowes Strategic Merge Patch • Adds replace, merge, delete for
objects and arrays • Merge keys for array elements • Schema defined defaults • Client directive overrides
@jrbowes Strategic Merge Patch ... metadata: labels: service: worker app:
marketplace spec: containers: - image: manifold/worker:1.31.18 name: worker
@jrbowes Strategic Merge Patch spec: containers: - image: manifold/sidecar:1.0.0 name:
metrics
@jrbowes Strategic Merge Patch ... spec: containers: - image: manifold/worker:1.31.18
name: worker - image: manifold/sidecar:1.0.0 name: metrics
@jrbowes Strategic Merge Patch ... spec: containers: - image: manifold/worker:1.31.18
name: worker - image: manifold/sidecar:1.0.0 name: metrics
@jrbowes Strategic Merge Patch spec: containers: - image: manifold/sidecar:1.0.0 name:
metrics - $patch: replace
@jrbowes lastAppliedConfiguration PROVIDES RICH CONTEXT
@jrbowes PRESERVE THE INTENT OF EVERY CLIENT
@jrbowes @jrbowes Photo by Gamze Bozkaya on Unsplash THE INTERNAL
MODEL
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes Photo by David Kovalenko on Unsplash LOST DATA
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes Photo by Fabrizio Verrecchia on Unsplash SLOW REACTIONS
@jrbowes @jrbowes
@jrbowes @jrbowes
@jrbowes @jrbowes Photo by Matt Artz on Unsplash PREVENTION AND
REPAIR
@jrbowes Lost Intermediate Data • Edge triggered ◦ Track last
seen revision number ◦ Perform a resync on missing version • Not an issue for level triggered
@jrbowes Stale Data • Heartbeat • Periodic resync (done in
Kubernetes)
@jrbowes Slow Reactions • Edge triggered ◦ Keep state for
last value ◦ Compute change to apply with real value, last seen, and changed • Not an issue for level triggered
@jrbowes @jrbowes
@jrbowes KEEP THE CONSUMER LOGIC SIMPLE
@jrbowes @jrbowes Photo by Hans-Peter Gauster on Unsplash PIECING IT
TOGETHER
@jrbowes Controllers are Clients, too • resourceVersion is used for
watching • Controllers may implement their own lastAppliedConfiguration • Different annotations allow unique targeting
@jrbowes TCP implementations should follow a general principle of robustness:
be conservative in what you do, be liberal in what you accept from others. - Jon Postel, RFC 761
@jrbowes be exhaustive in what you send, be explicit in
what you receive from others.
@jrbowes @jrbowes Photo by Annie Spratt on Unsplash WRAPPING UP
@jrbowes @jrbowes Photo by Michael Hoyt on Unsplash COLOCATE COMPLEX
LOGIC WITH STATE
@jrbowes @jrbowes Photo by Roman Koester on Unsplash IDENTIFY THE
AUDIENCE AND BUILD FOR THEM
@jrbowes @jrbowes Photo by Andrés Canchón on Unsplash MAKE IT
HARD FOR THE AUDIENCE TO FAIL
@jrbowes Thank you!