@@ -335,12 +335,20 @@ Some uses for an `emptyDir` are:
335
335
* holding files that a content-manager container fetches while a webserver
336
336
container serves the data
337
337
338
- Depending on your environment, `emptyDir` volumes are stored on whatever medium that backs the
339
- node such as disk or SSD, or network storage. However, if you set the `emptyDir.medium` field
340
- to `"Memory"`, Kubernetes mounts a tmpfs (RAM-backed filesystem) for you instead.
341
- While tmpfs is very fast, be aware that unlike disks, tmpfs is cleared on
342
- node reboot and any files you write count against your container's
343
- memory limit.
338
+ The `emptyDir.medium` field controls where `emptyDir` volumes are stored. By
339
+ default `emptyDir` volumes are stored on whatever medium that backs the node
340
+ such as disk, SSD, or network storage, depending on your environment. If you set
341
+ the `emptyDir.medium` field to `"Memory"`, Kubernetes mounts a tmpfs (RAM-backed
342
+ filesystem) for you instead. While tmpfs is very fast, be aware that unlike
343
+ disks, tmpfs is cleared on node reboot and any files you write count against
344
+ your container's memory limit.
345
+
346
+
347
+ A size limit can be specified for the default medium, which limits the capacity
348
+ of the `emptyDir` volume. The storage is allocated from [node ephemeral
349
+ storage](docs/concepts/configuration/manage-resources-containers/#setting-requests-and-limits-for-local-ephemeral-storage).
350
+ If that is filled up from another source (for example, log files or image
351
+ overlays), the `emptyDir` may run out of capacity before this limit.
344
352
345
353
{{< note >}}
346
354
If the `SizeMemoryBackedVolumes` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled,
@@ -364,7 +372,8 @@ spec:
364
372
name: cache-volume
365
373
volumes:
366
374
- name: cache-volume
367
- emptyDir: {}
375
+ emptyDir:
376
+ sizeLimit: 500Mi
368
377
` ` `
369
378
370
379
# ## fc (fibre channel) {#fc}
0 commit comments