Я пытаюсь настроить HPA для моего набора состояний (для эластичного поиска) в среде kubernetes.Я планирую масштабировать набор состояний с использованием процессора.Я создал сервер метрик из https://github.com/stefanprodan/k8s-prom-hpa/tree/master/metrics-server.
, и мой HPA yaml для statefulset выглядит следующим образом:
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: dz-es-cluster
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: StatefulSet
name: dz-es-cluster
minReplicas: 2
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
Но получаю вывод в hpa следующим образом:
Conditions:
Type Status Reason Message
---- ------ ------ -------
AbleToScale False FailedGetScale the HPA controller was unable to get the target's current scale: the server could not find the requested resource
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedGetScale 1m (x71 over 36m) horizontal-pod-autoscaler the server could not find the requested resource
кто-то, пожалуйста, помогите мне ..