Kubernetes Deep Dive

Sign Up Free or Log In to participate!

Specifying Resource limits

How do i default resource limits for a Pod

1 Answers

Thought i’d share this tip with the community (in case it not is not widely known)

At one point in the course, Nigel mentions that we must always define resource limits and requests for a Pod. Such a practice is very helpful for auto scaling and a well behaved cluster.

While that is true, in the real world i cannot force my developers define such limits . So i just use a LimitRange spec for each namespace.

Find the documentation at https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/

If the Kube API Server is configured with the LimitRanger admission controller, this spec is added to every pod which is admitted into the cluster. You get the same effect as if each developer had defined it with the Pod. Of course every pod is free to override the default..rules apply..

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?