# How to limit root disk space for pod？

**URL:** <https://discuss.kubernetes.io/t/how-to-limit-root-disk-space-for-pod/25943>\
**Category:** General Discussions\
**Created:** [November 2, 2023, 8:00am UTC](https://discuss.kubernetes.io/t/how-to-limit-root-disk-space-for-pod/25943 "2023-11-02T08:00:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dharma](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/dharma/32/13361_2.png) [@Dharma](https://discuss.kubernetes.io/u/Dharma)\
**Post date:** [November 2, 2023, 8:00am UTC](https://discuss.kubernetes.io/t/how-to-limit-root-disk-space-for-pod/25943/1 "2023-11-02T08:00:35Z")

</div>

I have pod deployed on a node with 600gb volume. I only want a pod to have 50gb root disk space.

So I have such config in deployment.yaml:

```auto
          limits:
            ephemeral-storage: "50G"

```

But when I entered the container, I found that all the disk space was allocated to the container

```bash
root@dbe9716daf8890-64fcccfc8-l4vph:/workspace# df -Th
Filesystem Type Size Used Avail Use% Mounted on
overlay overlay 662G 484G 145G 77% /
tmpfs tmpfs 64M 0 64M 0% /dev
tmpfs tmpfs 221G 0 221G 0% /sys/fs/cgroup
/dev/sda4 ext4 662G 484G 145G 77% /etc/hosts
shm tmpfs 64M 4.0K 64M 1% /dev/shm
tmpfs tmpfs 20G 12K 20G 1% /run/secrets/kubernetes.io/serviceaccount
tmpfs tmpfs 221G 12K 221G 1% /proc/driver/nvidia
tmpfs tmpfs 221G 0 221G 0% /proc/asound
tmpfs tmpfs 221G 0 221G 0% /proc/acpi
tmpfs tmpfs 221G 0 221G 0% /proc/scsi
tmpfs tmpfs 221G 0 221G 0% /sys/firmware

```

I’m hoping to find a way to keep the space seen by the df command consistent with the limit value I set
