У меня есть кластер K8s с одним узлом в Azure, использующий AKS.Я создал развертывание и службу с помощью простой команды:
kubectl run php-apache --image=pilchard/hpa-example:latest --requests=cpu=200m,memory=300M --expose --port=80
И включил HPA с помощью команды: kubectl autoscale deployment php-apache --cpu-percent=10 --min=1 --max=15
После запуска kubectl describe hpa php-apache
я вижуошибка:
horizontal-pod-autoscaler unable to get metrics for resource cpu: unable to fetch metrics from API: the server could not find the requested resource (get pods.metrics.k8s.io)
horizontal-pod-autoscaler failed to get cpu utilization: unable to get metrics for resource cpu: unable to fetch metrics from API: the server could not find the requested resource (get pods.metrics.k8s.io)
И метрика ЦП неизвестна при запуске kubectl get hpa
.Буду признателен за любую помощь.
Моя версия AKS kube - v1.9.11
.