kubernetes - Horizontal auto scaler doesn't report CPU usage -


i trying test kubernetes hpa in example here

kubectl run php-apache --image=gcr.io/google_containers/hpa-example --requests=cpu=200m --expose --port=80 kubectl autoscale deployment php-apache --cpu-percent=20 --min=1 --max=10 kubectl hpa 

output

name         reference               targets           minpods   maxpods   replicas   age php-apache   deployment/php-apache   <unknown> / 20%   1         3         0          1h 

why isn't controller-manager able current usage?


environment details :

  • k8s version 1.7.3 heapster running service on port 80, in kube-system.
  • influxdb set sink , can see usage/limit etc. correctly in grafana on heapster api
  • i can see cpu requests (200m) on deployed pod's yaml.
  • no errors in controller manager logs. see etcd watch , pod creation messages.
  • there no "horizontal-pod-autoscaler-sync-period" specified in controller manifest, default should 30 seconds.
  • "hpa describe" doesn't list events ("<none>").
  • creating/deleting hpa doesn't create log in controller-manager
  • when didn't have heapster installed, controller-manager logs complain. not see message heapster installed : "

failed compute desired number of replicas based on listed metrics deployment/xx/php-apache: failed cpu utilization: unable metrics resource cpu: failed pod resource metrics: server cannot complete requested operation @ time, try again later (get services http:heapster:)


edit 1 [14-sep] :

  • i have uploaded heapster logs here. no errors there.
  • i checked heapster api directly metrics, , response.

    curl http://10.107.55.59/api/v1/model/namespaces/cp/pods/php-apache-593471247-c65fh/metrics/cpu/usage

{ "metrics": [ { "timestamp": "2017-09-14t13:46:00z", "value": 19008838 }, { "timestamp": "2017-09-14t13:47:00z", "value": 19008838 }, { "timestamp": "2017-09-14t13:48:00z", "value": 19008838 } ], "latesttimestamp": "2017-09-14t13:48:00z" }

grafana screenshot pod. no limit set, doesn't make difference either.

validate if heapster fetching data , giving metric, try run below on kube-api server, replace namespace-name , pod-name in it. show metric, if well, paste heapster log here

curl http://localhost:8080/api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/metrics/


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -