@@ -242,19 +242,12 @@ the `emptyDir.medium` field to `"Memory"`, Kubernetes mounts a tmpfs (RAM-backed
242
242
filesystem) for you instead. While tmpfs is very fast be aware that, unlike
243
243
disks, files you write count against the memory limit of the container that wrote them.
244
244
245
-
246
245
A size limit can be specified for the default medium, which limits the capacity
247
246
of the `emptyDir` volume. The storage is allocated from [node ephemeral
248
247
storage](/docs/concepts/configuration/manage-resources-containers/#setting-requests-and-limits-for-local-ephemeral-storage).
249
248
If that is filled up from another source (for example, log files or image
250
249
overlays), the `emptyDir` may run out of capacity before this limit.
251
-
252
- {{< note >}}
253
- You can specify a size for memory backed volumes, provided that the `SizeMemoryBackedVolumes`
254
- [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
255
- is enabled in your cluster (this has been beta, and active by default, since the Kubernetes 1.22 release).
256
- If you don't specify a volume size, memory backed volumes are sized to node allocatable memory.
257
- {{< /note>}}
250
+ If no size is specified, memory backed volumes are sized to node allocatable memory.
258
251
259
252
{{< caution >}}
260
253
Please check [here](/docs/concepts/configuration/manage-resources-containers/#memory-backed-emptydir)
@@ -281,6 +274,27 @@ spec:
281
274
sizeLimit: 500Mi
282
275
` ` `
283
276
277
+ # ### emptyDir memory configuration example
278
+
279
+ ` ` ` yaml
280
+ apiVersion: v1
281
+ kind: Pod
282
+ metadata:
283
+ name: test-pd
284
+ spec:
285
+ containers:
286
+ - image: registry.k8s.io/test-webserver
287
+ name: test-container
288
+ volumeMounts:
289
+ - mountPath: /cache
290
+ name: cache-volume
291
+ volumes:
292
+ - name: cache-volume
293
+ emptyDir:
294
+ sizeLimit: 500Mi
295
+ medium: Memory
296
+ ` ` `
297
+
284
298
# ## fc (fibre channel) {#fc}
285
299
286
300
An `fc` volume type allows an existing fibre channel block storage volume
0 commit comments