Is it okay when two K8S controllers modify same resource at the same time? Is it okay when two K8S controllers modify same resource at the same time? kubernetes kubernetes

Is it okay when two K8S controllers modify same resource at the same time?


Yes, the same object can be updated by multiple controllers. The Pod object is updated by almost a dozen at this point I think. The main problem you can run into is write conflicts. Generally in an operator you do a get, then some stuff happens, then you do an update (usually to the status subresource for a root object case). This can lead to race conditions. I would recommend looking at using Server Side Apply to reduce these issues, it handle per-field tracking rather than whole objects via serial numbers.