Hi @Inderpreet @andrzej @Tej-Singh-Rana @akshayyw @royki
If we’re updating a deployment,
via kubectl edit deployment
and there is something called “annotations” in metadata section
which contains the exact same code that written outside of annotations
like replicas: 1 is written and same is written in the spec section of deployment as replicas: 1
If I update the deployment to 5 replicas, do I need to update the replicas value in annotations too?
If I update the deployment to 5 replicas, do I need to update the replicas value in annotations too?
No, you don’t need to update that value. That information useful in rolling update and rollback time.
Note: You can specify the
--record
flag to write the command executed in the resource annotationkubernetes.io/change-cause
. The recorded change is useful for future introspection. For example, to see the commands executed in each Deployment revision.