All Products
Search
Document Center

Enterprise Distributed Application Service:Configure ephemeral storage quotas

Last Updated:Jan 22, 2024

In Kubernetes, ephemeral storage refers to the space on a node that is used by each pod to temporarily store runtime data. By configuring ephemeral storage quotas, you can prevent disk resources on a node from being excessively consumed by containers in a single pod and the performance of other pods on the same node from being compromised. This topic describes how to configure ephemeral storage quotas for a pod when you change the specifications of an application. This ensures that disk resources in a cluster are properly allocated and used.

Background information

Ephemeral storage in Kubernetes refers to the temporary disk storage that is used by a pod. Ephemeral storage is tied to the lifecycle of a pod. When you delete or migrate a pod, its associated ephemeral storage is released. Therefore, data that is stored in ephemeral storage is not persistent.

If you do not configure ephemeral storage quotas for a pod, disk resources may soon be used up by containers in the pod. This compromises the performance of the pod itself and other pods that run on the same node. When disk resources become insufficient on a node, the Kubelet node evicts several pods to release resources and prevent impacts on the system.

In addition, Kubernetes allows you to configure the following ephemeral storage items for each pod: request and limit. This way, the node on which a pod is scheduled to run has sufficient disk resources.

  • Request: the minimum quota of disk resources that must be allocated to a pod. When the scheduler schedules a pod to a node, the request ensures that the node on which the pod is scheduled to run has sufficient ephemeral storage to satisfy the pod. This prevents the disk performance from being compromised due to heavy loads.

  • Limit: the maximum quota of disk resources that can be used by a pod. When the ephemeral storage usage of a pod exceeds the limit, the pod is subject to disk eviction. You can specify a limit to prevent the disk resources of a node from being excessively consumed by containers in a single pod. This ensures that other pods on the same node are not affected and the disk space of the node is properly allocated.

    Note

    The limit value must be greater than or equal to the request value.

Scenario

Ephemeral storage is suitable for the following scenarios:

  • Store the file systems of containers.

  • Store the logs of containers.

  • Provide an emptyDir volume that can be shared by multiple containers.

Procedure

The following sections describe how to configure ephemeral storage quotas for a pod when you create, deploy, or change the specifications of an application.

Note

If you want to configure ephemeral storage quotas for a pod, specify numeric values based on your business requirements. The default value 0 specifies unlimited ephemeral storage. If you do not want to configure the limit value for a pod, the cluster performance determines the maximum quota.

Create an application

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region. In the upper part of the Applications page, select a microservices namespace from the Microservices Namespace drop-down list.

  3. On the Applications page, click Create Application.

  4. In the Basic Information step, set the Cluster Type parameter to Kubernetes Clusters and click Next.

  5. In the Single-pod Resource Quota section of the Configurations step, configure the Ephemeral Storage Request (GB) and Ephemeral Storage Limit (GB) parameters.

Deploy an application

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region. In the upper part of the Applications page, select a microservices namespace from the Microservices Namespace drop-down list. Then, click the name of the application that you want to manage.

  3. In the upper-right corner of the application overview page, choose Deploy > Deploy.

  4. In the Single-pod Resource Quota section of the application release page, configure the Ephemeral Storage Request (GB) and Ephemeral Storage Limit (GB) parameters.

Change the specifications of an application

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region. In the upper part of the Applications page, select a microservices namespace from the Microservices Namespace drop-down list. Then, click the name of the application that you want to manage.

  3. In the Deployment specifications section of the application overview page, click the 编辑..png icon on the right of the value of the TemStorage parameter. In the Ephemeral-Storage(GB) section of the Change specifications dialog box, configure the Resource reservation and Resource constraints parameters.

References

For more information about how to configure other parameters when you create or deploy an application, see Create a Kubernetes application by using the default application source.