Getting Started with Managing Resources

Learn why resource management is important.

Why is resource management important?

Without an indication of how much CPU and memory a container needs, Kubernetes has no other option than to treat all containers equally. That often produces a very uneven distribution of resource usage. Asking Kubernetes to schedule containers without resource specifications is like getting in a boat without a captain.

We have come a long way toward understanding many of the essential Kubernetes object types and principles. One of the most important things we’re still missing is resource management. Kubernetes was blindly scheduling the applications we had deployed so far. We never gave it any indication of how many resources we expect those applications to use, and did not establish any limits.

Without these indications, Kubernetes carried out its tasks in a very myopic fashion. Kubernetes could see a lot, but not enough. We’ll change that soon. We’ll give Kubernetes a pair of glasses that will provide it with much better vision.

Once we learn how to define resources, we’ll go further and make sure that certain limitations are set, some defaults are determined, and there are quotas that will prevent applications from overloading the cluster.

After this chapter, we’ll have enough knowledge tot run Kubernetes in a production environment.

Enabling Metrics Server

The only new thing we’ll do this time is to enable one more add-on. We’ll add the Metrics Server to the cluster. It’s too soon to explain what it does and why we’ll need it. For now, just remember that there will soon be something in your cluster called Metrics Server.

Get hands-on with 1200+ tech skills courses.