[英]Flink Kubernetes deployment - the HPA controller was unable to get the target's current scale:
I am deploying the flink stateful app using the below-mentioned YAML file.我正在使用下面提到的 YAML 文件部署 flink 有状态应用程序。
apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
name: operational-reporting-15gb
spec:
image:.azurecr.io/stateful-app-v2
flinkVersion: v1_15
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
state.savepoints.dir: abfs://flinktest@.dfs.core.windows.net/savepoints.v2
state.checkpoints.dir: abfs://flinktest@.dfs.core.windows.net/checkpoints.v2
high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
high-availability.storageDir: abfs://flinktest@.dfs.core.windows.net/ha.v2
serviceAccount: flink
jobManager:
resource:
memory: "15360m"
cpu: 2
taskManager:
resource:
memory: "15360m"
cpu: 3
podTemplate:
spec:
containers:
- name: flink-main-container
volumeMounts:
- mountPath: /flink-data
name: flink-volume
volumes:
- name: flink-volume
emptyDir: {}
job:
jarURI: local:///opt/operationalReporting.jar
parallelism: 1
upgradeMode: savepoint
state: running
Flink jobs are running perfectly. Flink 作业运行良好。 For auto-scaling I created HPA using the following code.
对于自动缩放,我使用以下代码创建了 HPA。
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: basic-hpa
namespace: default
spec:
minReplicas: 1
maxReplicas: 15
metrics:
- type: Resource
resource:
name: memory
target:
type: Utilization
averageValue: 100m
scaleTargetRef:
apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
name: operational-reporting-15gb
While describing the auto scaling I am getting below mentioned error.在描述自动缩放时,我得到了下面提到的错误。
Type Status Reason Message类型 状态 原因 消息
AbleToScale False FailedGetScale the HPA controller was unable to get the target's current scale: flinkdeployments.flink.apache.org "operational-reporting-15gb" not found Events: Type Reason Age From Message AbleToScale False FailedGetScale HPA 控制器无法获取目标的当前比例:flinkdeployments.flink.apache.org "operational-reporting-15gb" not found Events: Type Reason Age From Message
Warning FailedGetScale 4m4s (x121 over 34m) horizontal-pod-autoscaler flinkdeployments.flink.apache.org "operational-reporting-15gb" not found警告 FailedGetScale 4m4s (x121 over 34m) Horizontal-pod-autoscaler flinkdeployments.flink.apache.org "operational-reporting-15gb" not found
For HPA target is showing UNKNOW.对于 HPA 目标显示 UNKNOW。 Kindly help
请帮助
I assume you are following the HPA example of the Kubernetes Operator.我假设您正在关注 Kubernetes Operator 的HPA 示例。 Thanks for giving it a try, it is an experimental feature as outlined in the docs, we only have limited experience with it at the moment.
感谢您试一试,它是文档中概述的实验性功能,目前我们对它的经验有限。
That said checking the obvious is your FlinkDeployment
named operational-reporting-15gb
running in the default
namespace?那就是说检查你的
FlinkDeployment
命名为operational-reporting-15gb
在default
命名空间中运行? Otherwise please adjust the namespace of your HPA accordingly.否则,请相应地调整 HPA 的命名空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.