在Kubernetes Pod名称中包含Pod创建时间 [英] Include Pod creation time in Kubernetes Pod name

查看:193
本文介绍了在Kubernetes Pod名称中包含Pod创建时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将Pod创建时间指定为k8s Pod Name的一部分?

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

场景:
我有许多具有相同名称前缀的Pod(以及名称的唯一生成的尾端),这些都是日志组的名称.

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.

不幸的是,AWS CloudWatch Logs控制台未按日志组创建时间进行排序.

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

推荐答案

不,至少没有部署时,有状态集可以工作,但是您实际上应该在这里使用标签.

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

这篇关于在Kubernetes Pod名称中包含Pod创建时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆