3

I know of ways to set up monitoring (e.g. prometheus/alert-manger) to notify me if kubernetes pod requests/limits are too far off actual container usage.

Are there any systems built to help you actually act on this information in some automated fashion though? This may sound odd as I realize automatically raising a limit makes it... not a limit?

Having said that, it still sounds useful to be able to automate tuning across a large k8s environment. This may be especially true during non-prod/staging when you're doing load testing and trying to figure out what the reasonable limits are in the first place.

2 Answers 2

1

Automating this kind of behaviour is a quite risky since you have ResourceQuotas usually set up as a constraint for a namespace and from there on the pods must be aligned with it. You might end up with a pod non being scheduled at all.

0

Great question, especially mentioning fine-tuning on DEV / STG during performance testing. You may try using Vertical Pod Autoscaler to at least get good baseline and go from there.

You can just use the recommender component (spec.updatePolicy.updateMode: Off) and not touch controllers at all:

Recommender - it monitors the current and past resource consumption and, based on it, provides recommended values for the containers' cpu and memory requests.


Keep in mind that VPA can not work with HPA enabled, and also keep in mind that each "adjustment" causes new ReplicaSet to be created (more limitations are documented in the docs).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.