Include Pod creation time in Kubernetes Pod name

9/7/2018

Is it possible to specify the Pod creation time as part of the k8s Pod Name?

Scenario:
I have many pods with the same name prefix (and uniquely generated tail-end of the name) and these are all names of log groups.

I wish to distinguish between log groups by creation time.

Unfortunately AWS CloudWatch Logs console does not sort by log group creation time.

-- cryanbhu
amazon-cloudwatchlogs
kubernetes

1 Answer

9/7/2018

No, not with a deployment at least, a stateful set would work but you should really be using labels here.

-- Michael Hausenblas
Source: StackOverflow