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
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.
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
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures