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
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
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
260
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
480
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
1
170
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
740
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
190
Agent Skils
dip_tech
PRO
0
130
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
330
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
200
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
4
460
Oracle AI Database移行・アップグレード勉強会 - RAT活用編
oracle4engineer
PRO
0
110
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
400
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
BBQ
matthewcrist
89
10k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
350
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
How to build a perfect <img>
jonoalderson
1
4.9k
GraphQLとの向き合い方2022年版
quramy
50
14k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Rails Girls Zürich Keynote
gr2m
96
14k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
77
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!