Skip to content

Commit 87a808d

Browse files
author
Lisa Pettyjohn
committed
OSDOCS-16945# CQA work Storage - understanding ephemeral storage
1 parent 0e61ce5 commit 87a808d

5 files changed

Lines changed: 23 additions & 22 deletions

modules/storage-ephemeral-storage-manage.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[id=storage-ephemeral-storage-manage_{context}]
99
= Ephemeral storage management
1010

11+
[role="_abstract"]
1112
Cluster administrators can manage ephemeral storage within a project by setting quotas that define the limit ranges and number of requests for ephemeral storage across all pods in a non-terminal state. Developers can also set requests and limits on this compute resource at the pod and container level.
1213

1314
You can manage local ephemeral storage by specifying requests and limits. Each container in a pod can specify the following:
@@ -16,7 +17,7 @@ You can manage local ephemeral storage by specifying requests and limits. Each c
1617
* `spec.containers[].resources.requests.ephemeral-storage`
1718
1819
[id=storage-ephemeral-storage-limits-requests-units_{context}]
19-
== Ephemeral storage limits and requests units
20+
.Ephemeral storage limits and requests units
2021
Limits and requests for ephemeral storage are measured in byte quantities. You can express storage as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
2122

2223
For example, the following quantities all represent approximately the same value: 128974848, 129e6, 129M, and 123Mi.
@@ -27,7 +28,7 @@ The suffixes for each byte quantity are case-sensitive. Be sure to use the corre
2728
====
2829

2930
[id=storage-ephemeral-storage-requests-limits_{context}]
30-
== Ephemeral storage requests and limits example
31+
.Ephemeral storage requests and limits example
3132
The following example configuration file shows a pod with two containers:
3233

3334
* Each container requests 2GiB of local ephemeral storage.
@@ -49,9 +50,9 @@ spec:
4950
image: images.my-company.example/app:v4
5051
resources:
5152
requests:
52-
ephemeral-storage: "2Gi" <1>
53+
ephemeral-storage: "2Gi"
5354
limits:
54-
ephemeral-storage: "4Gi" <2>
55+
ephemeral-storage: "4Gi"
5556
volumeMounts:
5657
- name: ephemeral
5758
mountPath: "/tmp"
@@ -69,12 +70,12 @@ spec:
6970
- name: ephemeral
7071
emptyDir: {}
7172
----
72-
<1> Container request for local ephemeral storage.
73-
<2> Container limit for local ephemeral storage.
73+
* `spec.containers.name.resources.requests.ephemeral-storage`: Container request for local ephemeral storage.
74+
* `spec.containers.name.resources.limits.ephemeral-storage`: Container limit for local ephemeral storage.
7475
7576
ifndef::microshift[]
7677
[id=storage-ephemeral-storage-scheduling-eviction_{context}]
77-
== Ephemeral storage configuration effects pod scheduling and eviction
78+
.Ephemeral storage configuration effects pod scheduling and eviction
7879
The settings in the pod spec affect both how the scheduler makes a decision about scheduling pods and when kubelet evicts pods.
7980

8081
* First, the scheduler ensures that the sum of the resource requests of the scheduled containers is less than the capacity of the node. In this case, the pod can be assigned to a node only if the node's available ephemeral storage (allocatable resource) is more than 4GiB.
@@ -84,7 +85,7 @@ endif::microshift[]
8485
8586
ifdef::microshift[]
8687
[id=storage-ephemeral-storage-eviction_{context}]
87-
== Ephemeral storage configuration effects pod eviction
88+
.Ephemeral storage configuration effects pod eviction
8889
The settings in the pod spec affect when kubelet evicts pods. At the container level, because the first container sets a resource limit, kubelet eviction manager measures the disk usage of this container and evicts the pod if the storage usage of the container exceeds its limit (4GiB). The kubelet eviction manager also marks the pod for eviction if the total usage exceeds the overall pod storage limit (8GiB).
8990

9091
[NOTE]

modules/storage-ephemeral-storage-monitoring.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
[id=storage-ephemeral-storage-monitoring_{context}]
88
= Monitoring ephemeral storage
99

10+
[role="_abstract"]
1011
You can use `/bin/df` as a tool to monitor ephemeral storage usage on the volume where ephemeral container data is located, which is `/var/lib/kubelet` and `/var/lib/containers`. The available space for only `/var/lib/kubelet` is shown when you use the `df` command if `/var/lib/containers` is placed on a separate disk by the cluster administrator.
1112

1213
.Procedure
1314

14-
* To show the human-readable values of used and available space in `/var/lib`, enter the following command:
15+
* To show the human-readable values of used and available space in `/var/lib`, run the following command:
1516
+
1617
[source,terminal]
1718
----

modules/storage-ephemeral-storage-overview.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
[id=storage-ephemeral-storage-overview_{context}]
99
= Overview
1010

11-
Pods and containers are ephemeral or transient in nature and designed for stateless applications. Ephemeral storage allows administrators and developers to better manage the local storage for some of their operations.
12-
11+
[role="_abstract"]
1312
In addition to persistent storage, pods and containers can require ephemeral or transient local storage for their operation. The lifetime of this ephemeral storage does not extend beyond the life of the individual pod, and this ephemeral storage cannot be shared across pods.
1413

1514
Pods use ephemeral local storage for scratch space, caching, and logs. Issues related to the lack of local storage accounting and isolation include the following:

modules/storage-ephemeral-storage-types.adoc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,11 @@
77
[id=storage-ephemeral-storage-types_{context}]
88
= Types of ephemeral storage
99

10-
Ephemeral local storage is always made available in the primary
11-
partition. There are two basic ways of creating the primary
12-
partition: root and runtime.
10+
[role="_abstract"]
11+
Ephemeral local storage is always made available in the primary partition.
1312

13+
There are two basic ways of creating the primary partition:
1414

15-
== Root
15+
* *Root*: This partition holds the kubelet root directory, `/var/lib/kubelet/` by default, and `/var/log/` directory. This partition can be shared between user pods, the OS, and Kubernetes system daemons. This partition can be consumed by pods through `EmptyDir` volumes, container logs, image layers, and container-writable layers. Kubelet manages shared access and isolation of this partition. This partition is ephemeral, and applications cannot expect any performance SLAs, such as disk IOPS, from this partition.
1616
17-
This partition holds the kubelet root directory, `/var/lib/kubelet/` by default, and `/var/log/` directory. This partition can be shared between user pods, the OS, and Kubernetes system daemons. This partition can be consumed by pods through `EmptyDir` volumes, container logs, image layers, and container-writable layers. Kubelet manages shared access and isolation of this partition. This partition is ephemeral, and applications cannot expect any performance SLAs, such as disk IOPS, from this partition.
18-
19-
20-
== Runtime
21-
22-
This is an optional partition that runtimes can use for overlay file systems. {product-title} attempts to identify and provide shared access along with isolation to this partition. Container image layers and writable layers are stored here. If the runtime partition exists, the `root` partition does not hold any image layer or other writable storage.
17+
* *Runtime*: This is an optional partition that runtimes can use for overlay file systems. {product-title} attempts to identify and provide shared access along with isolation to this partition. Container image layers and writable layers are stored here. If the runtime partition exists, the `root` partition does not hold any image layer or other writable storage.

storage/understanding-ephemeral-storage.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
:_mod-docs-content-type: ASSEMBLY
22
[id="understanding-ephemeral-storage"]
33
= Understanding ephemeral storage
4-
include::_attributes/common-attributes.adoc[]
4+
:toc:
5+
:toc-title:
56
:context: understanding-ephemeral-storage
7+
include::_attributes/common-attributes.adoc[]
8+
9+
[role="_abstract"]
10+
Pods and containers are ephemeral or transient in nature and designed for stateless applications. Ephemeral storage allows administrators and developers to better manage the local storage for some of their operations.
611

712
toc::[]
813

0 commit comments

Comments
 (0)