Does Kubernetes Know the Size of Docker Images When Pulling?

0
5
Asked By CuriousCoder42 On

I'm currently dealing with a node that's under disk pressure, and I'm curious if Kubernetes is aware of the size of the images it's pulling. I couldn't find much information on this topic. It seems like Karpenter provisioned a new node, and while the scheduler assigned a pod to it, the node quickly ran into disk pressure issues. The ephemeral file system usage looks fine, no more than 100MB. Is there a way to avoid this kind of problem? From what I understand, the ephemeral limit doesn't account for image size, and I'm almost certain that kubelet isn't aware of the image sizes at all. So, is the only solution to increase the EBS volume?

2 Answers

Answered By TechGuru99 On

Not really, Kubernetes doesn't track image size before pulling. When a pull command is issued, the container runtime fetches the image manifest which includes all the image layer details. It calculates the total size after pulling all the layers. This means it's only aware of the compressed sizes, which can be up to three times smaller than the uncompressed size.

Answered By DataWhiz77 On

How big is the image you're working with? If it's causing instability, that's definitely a concern! For reference, I have an image that's 1.6GB compressed and 5.4GB uncompressed. It does seem like Kubernetes might not know the uncompressed sizes, as the metrics from containerd only report the compressed size.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.