Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Startup-CPU-Limit for Java Applications in Kubernetes

I want to deploy some java (Spring Boot, MicroProfile, ...) apps to k8s. I want to define CPU requests and limits for those apps. The problem with limit is, that the apps need very long (30-90 seconds) time depending on the limit (around 300-500m). This is pretty/too long. The apps also don't need that much CPU. In idle they are <10m. And with load <100m.

How do you solve this kind of issues?

Is there something planed like the startup-probes for limits? (https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes)

Thanks

P.S. I'm aware of frameworks like quarkus or micronaut. But we got some legacy apps here we want to migrate to k8s.

like image 463
Fdot Avatar asked Oct 14 '25 07:10

Fdot


1 Answers

The usual solution is just to not use CPU limits. They are often best left off unless you know the service abuses the CPU and you can't fix it any other way.

like image 119
coderanger Avatar answered Oct 17 '25 10:10

coderanger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!