Without an indication 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 entering a taxi driven by a blind person.
We have come a long way, from humble beginnings, towards understanding many of the essential Kubernetes object types and principles. One of the most important things we’re missing is resource management. Kubernetes was blindly scheduling the applications we deployed so far. We never gave it any indication how much resources we expect those applications to use, nor established any limits.
Without these indications, Kubernetes was carrying 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 a much better vision.
Once we learn how to define resources, we’ll go further and make sure that certain limitations are set, that some defaults are determined, and that there are quotas that will prevent applications from overloading the cluster.
After this chapter, we’ll have enough knowledge to think about running Kubernetes in a production environment.