resourceVersion vs generation

Published:

In a standard scenario, this knowledge might not be that useful.

However it might be relevant if you design and implement your own Kubernetes Operators.

Resource Version

Generation

  • The most widespread use of generation is in Conditions API. It’s used to track if Condition is up to date with the “spec” part, so the intended state.
  • Conditions API includes “observedGeneration” field, that keeps track of generation that was used to come up with the condition value
  • It’s API Server, that is responsible for incrementing the generation field.

TODO: Look at https://alenkacz.medium.com/kubernetes-operator-best-practices-implementing-observedgeneration-250728868792, explain the difference between spec and status

  • Why needed ?
  • Keep track of changes

References

Did you like the blog post?

0