Skip to content

Commit 58b1e7d

Browse files
authored
Merge pull request #48254 from kannon92/size-memory-backed-volumes-ga
[KEP-1967] - update docs for GA
2 parents d8e00ce + eaadea5 commit 58b1e7d

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

content/en/docs/concepts/storage/volumes.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,19 +242,12 @@ the `emptyDir.medium` field to `"Memory"`, Kubernetes mounts a tmpfs (RAM-backed
242242
filesystem) for you instead. While tmpfs is very fast be aware that, unlike
243243
disks, files you write count against the memory limit of the container that wrote them.
244244

245-
246245
A size limit can be specified for the default medium, which limits the capacity
247246
of the `emptyDir` volume. The storage is allocated from [node ephemeral
248247
storage](/docs/concepts/configuration/manage-resources-containers/#setting-requests-and-limits-for-local-ephemeral-storage).
249248
If that is filled up from another source (for example, log files or image
250249
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.
258251

259252
{{< caution >}}
260253
Please check [here](/docs/concepts/configuration/manage-resources-containers/#memory-backed-emptydir)
@@ -281,6 +274,27 @@ spec:
281274
sizeLimit: 500Mi
282275
```
283276

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+
284298
### fc (fibre channel) {#fc}
285299

286300
An `fc` volume type allows an existing fibre channel block storage volume

content/en/docs/reference/command-line-tools-reference/feature-gates/size-memory-backed-volumes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ stages:
1313
- stage: beta
1414
defaultValue: true
1515
fromVersion: "1.22"
16+
toVersion: "1.31"
17+
- stage: stable
18+
defaultValue: true
19+
fromVersion: "1.32"
1620
---
1721
Enable kubelets to determine the size limit for
1822
memory-backed volumes (mainly `emptyDir` volumes).

0 commit comments

Comments
 (0)