本文主要是介绍HPA monitoring cpu utilization fails for deployments which have init containers,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
HPA monitoring cpu utilization fails for deployments which have init containers
- 1. 背景
- 2. 环境
- 3. 问题
- 4. 参考解决方案
1. 背景
工作遇到的类似问题,参考官网进行收集归档,进行笔记形式的记录,便于后续查看。
2. 环境
OpenShift Container Platform (OCP) 4.5
3. 问题
HPA monitoring cpu utilization fails for deployments which have init containers
应用中配置了自动伸缩(其dc里有1个initcontainer, 1个container)无法进行自动伸缩.
官方bug 详情
4. 参考解决方案
OCP 4.7.0 已修复 此 Bug
原因:对于具有初始化容器的Pod,HPA会忽略具有不完整度量标准的Pod,例如Prometheus适配器发送的度量。
结果:任何带有初始化容器的容器都不会缩放。
修复:使Prometheus适配器发送有关初始化容器的完整指标。
结果:HPA可以缩放带有初始化容器的容器。
Cause: HPA ignores pods with incomplete metrics like those sent by the prometheus adaptor in the case of pods with init containers.
Consequence: Any pod with an init container would not be scaled.
Fix: Make prometheus adaptor send complete metrics for init containers.
Result: HPA can scale pods with init containers.
这篇关于HPA monitoring cpu utilization fails for deployments which have init containers的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!