My Authors
Read all threads
THREAD

In Kubernetes ⎈, are there hidden costs on running many cluster nodes?

(spoiler: yes)
Not all CPU and memory in your Kubernetes nodes can be used to run Pods.

CPU and Memory are divided into:

1. Operating system
2. Kubelet, CNI, CRI
3. Pods
4. Eviction threshold
2/6

Let's make a quick example.

Imagine you have a cluster with a single 1GiB / 1vCPU Node.

The following resources are reserved for the kubelet + os:

- 255MiB of Memory
- 60 Mi of CPU

That's 25% of Memory and 6% of CPU that you can't use.
Let's pick GCP's n1-standard-1 instance (1 vCPU, 3.75GB).

Google reserves for the kubelet + os:

- 937MB of Memory
- 60 Mi of CPU

So you can only use ~3GB of Memory for your Pods (~75% of the available).
4/6

EKS has similar (interesting?) limits.

Let's pick an m5.large (2vCPU, 8GiB)

Amazon reserves for the kubelet + os:

- 574MiB of Memory
- 160 Mi of CPU

This time you are lucky. You can use ~93% of the available Memory.
5/6

Cost is not the only metric when choosing an instance type for your cluster, but it is certainly a factor.

If you're interested in exploring more about node sizes, we published an extensive article on our blog:

learnk8s.io/kubernetes-nod…
6/6

Links:

- Allocatable memory and CPU resources on GCP cloud.google.com/kubernetes-eng…
- AWS EKS AMI kubeReserved github.com/awslabs/amazon…
- AKS resource reservations docs.microsoft.com/en-us/azure/ak…
- Official docs kubernetes.io/docs/tasks/adm…
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Daniele Polencic

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!