I’m in the process of getting HPA working for my application and I’m seeing that, by default, neither memory nor CPU metrics are visible to master node / autoscaler. I’m seeing a couple suggestions but mostly these seem to apply either to different cases (AWS) or older versions.
Should I expect these basic metrics, availble via the GKE console, to work OOTB? Or is it expected that I roll some code to expose these metrics?
I have configured my Java application to work with available memory in the container (relatively new feature of Java 8+) and I have requested a safe amount memory (only 512Mi) and set a low-ish memory limit (1Gi). I have two Java apps (REST services) and an Ngnix instance serving static content (SPA) with generous request/limit at half of the Java services.
With this configuration, I think the OS (process) level memory and CPU metrics should work. Do I have this right? If so, what do I need to do to get the metrics visible to the HPA?
I have a separate question about all the various metrics oriented services running on the nodes. These seem like different, if related, questions. Here I’m specifically trying to get the OOTB CPU and memory metrics working. Not alter any system pods, per se.
Thanks for any pointers.
Kubernetes version: 1.14.8-gke.33
Cloud being used: GKE
Installation method: Console + kubectl apply
Host OS: Container Optimized
CNI and version: VPC Network (?)
CRI and version: ?