Get the drift of Kubernetes Pod’s resources

Keep your Kubernetes cluster and Pods healthy by setting requested and limited container resources (CPU & MEM)

Katarzyna Dusza
The Startup

--

When we start playing around with Kubernetes, we usually forget about setting container resources at the beginning. We just want to make sure our Docker image works and it’s deployable to the Kubernetes cluster. If it’s only one app out there and we are just experimenting, that’s fine. But sooner or later, we want to deploy this app to the production cluster together with other apps, which are already there. To make our application a pleasant Kubernetes citizen, we have to allocate a proper number of container resources. We have to ensure they will be enough to start the app, run it, and it wouldn’t cause any issues with other already running applications.

Defining resources is very important and has many advantages. We can minimize the costs to the cloud provider, but most importantly, it helps Kubernetes manage the cluster by keeping it in a healthy condition.

In this blog post, we will cover the Pod’s container resources (CPU & MEM), its’ requests, and limits. We will learn what advantages these settings bring, and what will happen if we won’t set them. In the Q&A sections, we will get the answers to the most frequently asked questions.

# Kubernetes #k8s # Pod’s resources # CPU # MEM #request #limit

Compute resources

--

--

Katarzyna Dusza
The Startup

Software Engineer, IT enthusiast, working at Spotify. Check my personal website: katarzyna-dusza.github.io