Hello Jörg Lang,
Thank you for reaching out to the Microsoft Q&A platform.
It looks like the Horizontal Pod Autoscaler (HPA) is unable to get metrics for resource memory and CPU, which is causing the warnings you're seeing. This could be due to a few different reasons:
The metrics server is not running or is not properly configured. The metrics server is responsible for collecting resource utilization data from the Kubernetes API server and making it available to other components, such as the HPA. You can check if the metrics server is running by running the command kubectl get pods -n kube-system | grep metrics-server
.
The HPA is not properly configured to use the metrics server. You can check the HPA configuration by running the command kubectl describe hpa HPA_NAME
.
There is not enough load on the application to trigger the HPA. The HPA will only scale up or down the number of replicas based on the resource utilization metrics it receives. If the application is not under enough load to trigger the HPA, it will not receive any metrics and the HPA will not scale the replicas.
Regarding your deployment configuration, it looks like you have set resource requests and limits for CPU and memory. This is a good practice to ensure that your application has enough resources to run properly and to prevent resource contention with other applications running on the same node. However, it does not directly affect the HPA's ability to get metrics for resource utilization.
I hope this helps you troubleshoot the issue. Let me know if you have any further questions or if there's anything else I can help you with.
Please Accept Answer and hit Yes for "was this answer helpful" if this helps