kubernetesgoogle-kubernetes-enginecontainerd

Where does GKE store images on nodes and do images take up pod ephemeral storage?


I'm having a hard time finding anything about this in the docs.

I'm running GKE with containerd.

I can login to a node and run crictl images and see all the images.

But what I'm trying to find out is

  1. Where on the node are the images stored/cached
  2. Does image storage on nodes eat into storage made available to pods as ephemeral storage?

Solution

    1. Container images are stored on the nodes in a location specific to the container runtime being used. GKE uses the container runtime containerd as the default for newly created clusters and node pools with version 1.23.17-gke.7000 or later. Container images are stored in the /var/lib/containerd directory on each node. Within this directory, the images are stored in subdirectories.

    GKE manages the container runtime and image distribution automatically, and it's generally not necessary to interact with these directories manually. Keep in mind that directly accessing or modifying the container image storage directories on GKE nodes is not recommended.

    Each node in a GKE cluster needs to have sufficient storage capacity to store the container images required by the pods running on that node. When a container image is pulled from the container registry and stored on a node, it occupies disk space on that node.

    1. No, the storage used for container images on GKE nodes does not eat into the storage made available to pods as ephemeral storage. The storage for container images and the storage allocated to pods as ephemeral storage are separate and distinct.

    However, it's important to note that the overall storage capacity of the node, including the space used by container images, can affect the amount of available ephemeral storage for the pods