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.
More hard Kubernetes questions
- A namespace has been stuck in Terminating for hours. What is the most likely cause?
- What does podManagementPolicy: Parallel change in a StatefulSet?
- What does volumeBindingMode: WaitForFirstConsumer on a StorageClass do?
- A slow-starting application is killed by its liveness probe before it finishes starting. What is the recommended fix?
- Which Pod Security Standards level requires pods to run as non-root, drop ALL capabilities, and use a seccomp profile?
- What is a Kubernetes Operator?