0

I wanted to setup HPA for a deployment on my kubernetes cluster (1.14.0 on bare metal) so I followed the instructions to setup metrics-server here: https://github.com/kubernetes-sigs/metrics-server.

After deploying metrics-server, I am able issue commands like kubectl top nodes and deploy HPA's using kubectl autoscale deployment <deployment-name> --min=1 ...

Currently, the issue I am facing is the HPA's created from kubectl autoscale ... seem to be deleted automatically for some reason after around 4-5 mins. So, I feel like there is some important information/step I am missing related to HPA on kubernetes? But I couldn't find any further information related to this particular issue when searching online...

rlzh
  • 1
  • 1
  • Hi, welcome to stack overflow. Could the deletion be part of a scale down activity? – Jeroen Heier Nov 26 '19 at 19:03
  • @JeroenHeier I don't think so. At least, nothing I explicitly setup. – rlzh Nov 26 '19 at 19:59
  • The HorizontalPodAutoscaler resources get deleted? So when you do `kubectl get hpa`, it's not there anymore? – weibeld Nov 27 '19 at 09:56
  • @weibeld Yup, I am monitoring it using "watch kubectl get hpa" and they seem to be deleted around 4min after they are created – rlzh Nov 27 '19 at 16:40
  • Is your k8s cluster deployed with `kubeadm` ? If yes and `kube-apiserver` is deployed as a `pod` you can try `kubectl logs -n kube-system kube-apiserver`. There should be some information regarding creation and removal of `hpa` resource there. – mario Dec 04 '19 at 14:08

0 Answers0