How does storage works

Hi there,

I have some questions about storage and managing quotas. I’m sorry if my question is newbie, I tried to read the docs as much as I can but I did not understand something to get my answer, so sorry if it bothers you:(

  1. Imagine I have this in my deploy.yaml file. Does this 5G limits the whole pod? I mean all of /var/log and another path like /home and all other dirs under / size will be limited to 5G? Or I should specify exactly which dir I want to limit?
spec:
  containers:
    limits:
      storage: 5Gi
  1. Is that possible to limit the whole pod’s size to 5GB as an example? Or I just can limit some directories like /home/ and /usr/src?
  2. No matter this limit is for the whole pod or only some specified dirs, then how may I increase this limit after a time when I need to increase? Is that possible?

If it’s data that needs to outlive the container, I recommend using a PhysicalVolumeClaims, which are limited by default. You’ll need to know if your storage class supports resizing for increasing the volume.

For just a container, check out requests.ephemeral-storage and limits.ephemeral-storage: Resource Quotas | Kubernetes