k8wiz
Kubernetes
Hard
Architecture

Two controllers read the same Deployment and both send an update based on what they read. How does the API server stop the second update from silently overwriting the first?

Select your answer:

Show answer and explanation

Answer: A stale resourceVersion in the update gets a 409 Conflict

Explanation

Kubernetes uses optimistic concurrency. Every object has a resourceVersion that changes on each write. An update that sends an outdated resourceVersion fails with 409 Conflict, and the client has to read the object again and retry. Server-side apply adds field ownership on top of this, so conflicts are reported per field.