How do I determine resources required and set limits for applications running in k8s pods?

4/18/2019

We run 8 microservices on k8s and i'd like to learn how to define what resource limits to use for my pods. This isn't that big of an issue when running on our cloud platform but I do like to test it locally as well.

Currently, i'll just guess and allocate, sometimes i'll check how much they're consuming once they're running using kubectl describe nodes

Is there a better way to determine the resources a particular application will need?

-- Panda
containers
docker
kubernetes
kubernetes-helm

1 Answer

4/18/2019
  1. You may try Vertical Pod Autoscaler. It was created to address the same issue you have.
  2. You should also have some fancy graphs using Prometheus + Grafana. Graphs describe pods resource requests and limits as well as how much resources you have free in your cluster. Looking at "kubectl describe nodes" is not cool at all. You may find very good starting point here: https://github.com/coreos/kube-prometheus
-- Vasily Angapov
Source: StackOverflow