I am using Kube version v1.13.0. Since Heapster is depreciated from v1.11 I am stuck in enabling the API server for cluster Metrics to implement HPA.
Can someone guide me for step by step enable for the API Metrics server or any Demo video. It would be really helpful to proceed further.
Please let me know if any further information needed.
Thanks Deena
I am able to implement HPA using
metrics-server
as heapster is depreciated. I have followed the following steps:git clone https://github.com/kubernetes-incubator/metrics-server.git
Go into directory
cd deploy/1.8+
and run following yaml files:Now create a pod you want to test for autoscaling (taken from kubernetes official docs):
Now create a autoscale deployment:
Now check the HPA, your metrics are coming or not:
Now generate load from another window using:
It will open a sh terminal and you can run a load from that sh terminal using:
It will take a minute or so to take enough load on your pod and you see a boom:
And pods scaling :
Hope this helps to get your HPA working.
EDIT:
Replace the
metrics-server-deployment.yaml
file indeploy/1.8+
with the following yaml file:Also, enable the
--authentication-token-webhook
in kubelet.conf, then you will be able to get the HPA.EDIT2: You need to set following properties in the deployment file (in your case it is tomcat) for which you are creating HPA, then only your HPA can fetch metrics from your deployment.