Reputation: 41300
I find that when I do scheduled docker stack deploy
ments and they happen around the same time I may get an "update out of sequence" error in a deployment.
I've seen many bugs and issues on this
Some of them are closed, but the problem apparently still persists to this day for some people. I was wondering if Kubernetes has solved this issue so it does not happen on K8S clusters.
Upvotes: 1
Views: 283
Reputation: 74690
I wouldn't say the general issue is "solved" in Kubernetes as any shared system updating data can have synchronisation issues. You won't run into the issue often with the kubernetes primitives though.
That is until you start using complex, external Kubernetes API clients. Another area might be controllers competing with you to make updates (e.g the horizontal auto scaler setting replicas
).
All kubernetes resources have a "resource version" in their metadata and it's possible for that data to be updated out of band with another change. This generally happens when data needs to be retrieved and inspected for an update to be made:
val
val
val
val
val
, resourceVersion
incrementsval
, resourceVersion
mismatch, fails. You could also add "C" into the mix. "C" isn't a very responsible shared api client (Bad C!). When applying it's val
change, C doesn't supply a resourceVersion
on it's update and silently blats any updates that were made since it retrieved val
.
You will find that most kubernetes resources can be managed declaratively. So by applying PATCHes to an existing resources atomically on the kube apiserver (that atomicity is for a single resource).
Upvotes: 2