Let’s take a look at the cluster resources we have in our cluster. It is small, and it’s not even a real cluster. However, it’s the only one we have (for now), so please use your imagination and pretend that it’s “real”.
Our cluster has 2 CPUs and 2 GB of memory. Now, let’s say that this cluster serves only development and production purposes. We can use the default Namespace for production and create a dev Namespace for development. We can assume that the production should consume all the resources of the cluster minus those given to the dev Namespace which, on the other hand, should not exceed a specific limit.
The truth is that with 2 CPUs and 2 GB of memory, there isn’t much we can give to developers. Still, we’ll try to be generous. We’ll give them 500 MB and 0.8 CPUs for requests. We’ll allow occasional bursts in resource usage by defining limits of 1 CPU and 1 GB of memory. Furthermore, we might want to limit the number of Pods to ten. Finally, as a way to reduce risks, we will deny developers the right to expose node ports.
Isn’t that a decent plan? I’ll imagine that, at this moment, you are nodding as a sign of approval so we’ll move on and create the quotas we discussed.