Merge pull request #48254 from kannon92/size-memory-backed-volumes-ga
[KEP-1967] - update docs for GA
This commit is contained in:
		
						commit
						58b1e7df56
					
				| 
						 | 
					@ -242,19 +242,12 @@ the `emptyDir.medium` field to `"Memory"`, Kubernetes mounts a tmpfs (RAM-backed
 | 
				
			||||||
filesystem) for you instead.  While tmpfs is very fast be aware that, unlike
 | 
					filesystem) for you instead.  While tmpfs is very fast be aware that, unlike
 | 
				
			||||||
disks, files you write count against the memory limit of the container that wrote them.
 | 
					disks, files you write count against the memory limit of the container that wrote them.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
A size limit can be specified for the default medium, which limits the capacity
 | 
					A size limit can be specified for the default medium, which limits the capacity
 | 
				
			||||||
of the `emptyDir` volume. The storage is allocated from [node ephemeral
 | 
					of the `emptyDir` volume. The storage is allocated from [node ephemeral
 | 
				
			||||||
storage](/docs/concepts/configuration/manage-resources-containers/#setting-requests-and-limits-for-local-ephemeral-storage).
 | 
					storage](/docs/concepts/configuration/manage-resources-containers/#setting-requests-and-limits-for-local-ephemeral-storage).
 | 
				
			||||||
If that is filled up from another source (for example, log files or image
 | 
					If that is filled up from another source (for example, log files or image
 | 
				
			||||||
overlays), the `emptyDir` may run out of capacity before this limit.
 | 
					overlays), the `emptyDir` may run out of capacity before this limit.
 | 
				
			||||||
 | 
					If no size is specified, memory backed volumes are sized to node allocatable memory.
 | 
				
			||||||
{{< note >}}
 | 
					 | 
				
			||||||
You can specify a size for memory backed volumes, provided that the `SizeMemoryBackedVolumes`
 | 
					 | 
				
			||||||
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
 | 
					 | 
				
			||||||
is enabled in your cluster (this has been beta, and active by default, since the Kubernetes 1.22 release).
 | 
					 | 
				
			||||||
If you don't specify a volume size, memory backed volumes are sized to node allocatable memory.
 | 
					 | 
				
			||||||
{{< /note>}}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{< caution >}}
 | 
					{{< caution >}}
 | 
				
			||||||
Please check [here](/docs/concepts/configuration/manage-resources-containers/#memory-backed-emptydir)
 | 
					Please check [here](/docs/concepts/configuration/manage-resources-containers/#memory-backed-emptydir)
 | 
				
			||||||
| 
						 | 
					@ -281,6 +274,27 @@ spec:
 | 
				
			||||||
      sizeLimit: 500Mi
 | 
					      sizeLimit: 500Mi
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### emptyDir memory configuration example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					apiVersion: v1
 | 
				
			||||||
 | 
					kind: Pod
 | 
				
			||||||
 | 
					metadata:
 | 
				
			||||||
 | 
					  name: test-pd
 | 
				
			||||||
 | 
					spec:
 | 
				
			||||||
 | 
					  containers:
 | 
				
			||||||
 | 
					  - image: registry.k8s.io/test-webserver
 | 
				
			||||||
 | 
					    name: test-container
 | 
				
			||||||
 | 
					    volumeMounts:
 | 
				
			||||||
 | 
					    - mountPath: /cache
 | 
				
			||||||
 | 
					      name: cache-volume
 | 
				
			||||||
 | 
					  volumes:
 | 
				
			||||||
 | 
					  - name: cache-volume
 | 
				
			||||||
 | 
					    emptyDir:
 | 
				
			||||||
 | 
					      sizeLimit: 500Mi
 | 
				
			||||||
 | 
					      medium: Memory
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### fc (fibre channel) {#fc}
 | 
					### fc (fibre channel) {#fc}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
An `fc` volume type allows an existing fibre channel block storage volume
 | 
					An `fc` volume type allows an existing fibre channel block storage volume
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,10 @@ stages:
 | 
				
			||||||
  - stage: beta
 | 
					  - stage: beta
 | 
				
			||||||
    defaultValue: true
 | 
					    defaultValue: true
 | 
				
			||||||
    fromVersion: "1.22"
 | 
					    fromVersion: "1.22"
 | 
				
			||||||
 | 
					    toVersion: "1.31"
 | 
				
			||||||
 | 
					  - stage: stable
 | 
				
			||||||
 | 
					    defaultValue: true
 | 
				
			||||||
 | 
					    fromVersion: "1.32"
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
Enable kubelets to determine the size limit for
 | 
					Enable kubelets to determine the size limit for
 | 
				
			||||||
memory-backed volumes (mainly `emptyDir` volumes).
 | 
					memory-backed volumes (mainly `emptyDir` volumes).
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue