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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
James Bowes
May 16, 2018
Technology
0
120
Level Triggered and Reconciled: How Kubernetes Manages its State
James Bowes
May 16, 2018
Tweet
Share
More Decks by James Bowes
See All by James Bowes
Write Once, Compile Lots, Run Anywhere
jbowes
0
190
A Token Of Respect: Implementing Microservice Identity And Access Management In Go
jbowes
0
240
Shattered Mirror: An Introduction to Reflect and Unsafe
jbowes
0
44
Shattered Mirror: An Introduction to Reflect and Unsafe
jbowes
0
1.4k
Cloud Jumping With Kubernetes
jbowes
0
94
Building APIs for an unreliable world
jbowes
0
59
API Design Lessons From Kubernetes
jbowes
0
94
CL_Eye-Catching_User_Interfaces.pdf
jbowes
0
50
Higher-Order Deployments: Reducing Boilerplate With Kubernetes Custom Resource Definitions
jbowes
0
52
Other Decks in Technology
See All in Technology
Greatest Disaster Hits in Web Performance
guaca
0
280
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
私たち準委任PdEは2つのプロダクトに挑戦する ~ソフトウェア、開発支援という”二重”のプロダクトエンジニアリングの実践~ / 20260212 Naoki Takahashi
shift_evolve
PRO
2
190
Cosmos World Foundation Model Platform for Physical AI
takmin
0
970
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
380
SRE Enabling戦記 - 急成長する組織にSREを浸透させる戦いの歴史
markie1009
0
170
ECS障害を例に学ぶ、インシデント対応に備えたAIエージェントの育て方 / How to develop AI agents for incident response with ECS outage
iselegant
3
290
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
570
【Ubie】AIを活用した広告アセット「爆速」生成事例 | AI_Ops_Community_Vol.2
yoshiki_0316
1
120
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
480
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
130
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
330
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
The agentic SEO stack - context over prompts
schlessera
0
650
The Cult of Friendly URLs
andyhume
79
6.8k
Why Our Code Smells
bkeepers
PRO
340
58k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
68
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Are puppies a ranking factor?
jonoalderson
1
2.7k
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!