[英]scale stateful set with shared volume per az
I would like to scale a kubernetes stateful set in EKS which serves static data.我想在 EKS 中扩展一个 kubernetes 有状态集,它提供 static 数据。 The data should be shared where possible, which means by availability zone.
应尽可能共享数据,这意味着通过可用区。
Can I specify a volume claim template to make this possible?我可以指定一个批量声明模板来实现这一点吗? Or is there another mechanism?
还是有其他机制?
I also need to initialize the volume (in an init-container) when the first node joins.当第一个节点加入时,我还需要初始化卷(在 init-container 中)。 Do I need to provide some external locking mechanism rather than just checking if volume is empty?
我是否需要提供一些外部锁定机制而不仅仅是检查卷是否为空?
If you want your pods to share static data, then you can:如果您希望您的 pod 共享 static 数据,那么您可以:
ReadOnlyMany
)ReadOnlyMany
) A few comments:几点评论:
initContainer
(then use ReadWriteMany
instead of ReadOnlyMany
).initContainer
(然后使用ReadWriteMany
而不是ReadOnlyMany
)。 Depending on what you try to do exactly, but maybe you can first initialize the data and then start your Deployment (and Pods), then you'd not need to lock anything
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.