Skip to content

Commit b103775

Browse files
authored
Merge pull request #47064 from Ritikaa96/annotation-restartedAt
Registering and Documenting restartedAt annotation
2 parents b6ca184 + 3fcd8cd commit b103775

File tree

1 file changed

+19
-0
lines changed
  • content/en/docs/reference/labels-annotations-taints

1 file changed

+19
-0
lines changed

content/en/docs/reference/labels-annotations-taints/_index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,25 @@ The kubectl command line tool uses this annotation as a legacy mechanism
12751275
to track changes. That mechanism has been superseded by
12761276
[Server-side apply](/docs/reference/using-api/server-side-apply/).
12771277
1278+
### kubectl.kubernetes.io/restartedAt {#kubectl-k8s-io-restart-at}
1279+
1280+
Type: Annotation
1281+
1282+
Example: `kubectl.kubernetes.io/restartedAt: "2024-06-21T17:27:41Z"`
1283+
1284+
Used on: Deployment, ReplicaSet, StatefulSet, DaemonSet, Pod
1285+
1286+
This annotation contains the latest restart time of a resource (Deployment, ReplicaSet, StatefulSet or DaemonSet),
1287+
where kubectl triggered a rollout in order to force creation of new Pods.
1288+
The command `kubectl rollout restart <RESOURCE>` triggers a restart by patching the template
1289+
metadata of all the pods of resource with this annotation. In above example the latest restart time is shown as 21st June 2024 at 17:27:41 UTC.
1290+
1291+
You should not assume that this annotation represents the date / time of the most recent update;
1292+
a separate change could have been made since the last manually triggered rollout.
1293+
1294+
If you manually set this annotation on a Pod, nothing happens. The restarting side effect comes from
1295+
how workload management and Pod templating works.
1296+
12781297
### endpoints.kubernetes.io/over-capacity
12791298

12801299
Type: Annotation

0 commit comments

Comments
 (0)