One reason container technology has surpassed virtual machines is that it is possible to put more containers on a host, reducing your overall number of compute instances, and saving you money on your infrastructure costs. If you’re using containers with Kubernetes, though, it is possible to increase efficiency even more by setting sensible CPU and memory requests and limits on pods which will allow you to pack more workloads onto your worker nodes.
Until now, the tools to gather data about the efficiency of your Kubernetes workloads have been difficult to install and use, but Fairwinds Insights gives you access to our tool Goldilocks, which helps you get your pod resource requests “just right.” If you’d like to see resource recommendations for your Kubernetes clusters, follow the instructions below:
Another benefit of Goldilocks is that it can give you a sense if your workloads are CPU-intensive, memory-intensive or balanced between the two. This data can help you evaluate whether or not you’ve selected the most efficient machine types for your Kubernetes worker nodes.
A few months ago, we generated a Golidlocks report for a customer, and we discovered that one of their deployments generated pods that used almost no CPU, but a lot of memory. We had originally setup their Kubernetes cluster to use just one AWS instance type: m5.xlarge. These machines are designed to strike a balance between compute, memory and network resources, but since their largest deployment of pods were memory-intensive applications, we looked for an AWS EC2 instance type that had more memory resources, but fewer vCPUs. We ended up changing some of their worker nodes to r5.xlarge instances. More of these memory-intensive pods fit on the r5.xlarge worker nodes, and these instance types were 36% cheaper than the original, saving this customer money and reducing the size of their Kubernetes cluster.
If you’re curious about machine types, here are the specs for the three largest cloud-providers:
In summary, Goldilocks — a tool in our Fairwinds Insights suite — helps you and your team set data-informed CPU and memory requests and limits, which can ultimately increase how efficiently you use your cloud infrastructure, reducing the sprawl of your Kubernetes clusters and saving you money.
Fairwinds Insights is available to use for free. You can sign up here.