Help Center/ Cloud Container Engine_Autopilot/ User Guide/ Storage/ Increasing the Ephemeral Storage Space of a Pod
Updated on 2025-01-03 GMT+08:00

Increasing the Ephemeral Storage Space of a Pod

Each pod in a workload is provided with 30-GiB free storage capacity by default (maximum IOPS of 2,500 and maximum burst IOPS of 16,000). The OS and CCE platform components will occupy some storage space, and the total available capacity for images, containers, and ephemeral storage is about 20 GiB. If the storage capacity cannot meet service requirements, you can add ephemeral storage for a pod on the console or by running kubectl commands. The ephemeral storage is billed by capacity and usage duration. For details, see Pricing Details.

Constraints

The cluster version must be 1.27.8-r0, 1.28.6-r0, or later. If the cluster version does not meet the requirements, you need to upgrade the cluster.

Adding Ephemeral Storage for a Pod

Increase the ephemeral storage capacity for a pod using the console or kubectl.

The following are operations for you to add ephemeral storage capacity for a pod on the console. For details about workload parameters, see Creating a Workload.

  1. Log in to the CCE console and click the cluster name to access the cluster console.
  2. In the navigation pane on the left, choose Workloads.

    • To add ephemeral storage for a pod during workload creation, select the workload type and click Create Workload in the upper right corner of the page.
    • To add ephemeral storage for a pod of an existing workload, locate the workload and click Upgrade in the Operation column.

  3. Add ephemeral storage for a pod in either of the following methods.

    Table 1 Two methods of adding ephemeral storage for a pod

    Method

    Example

    Procedure

    Adding an annotation

    Key: resource.cce.io/extra-ephemeral-storage-in-GiB

    Value: 10

    1. In the Advanced Settings area, choose Labels and Annotations.
    2. Enter resource.cce.io/extra-ephemeral-storage-in-GiB as the key of the pod annotation.
    3. In the Value text box of the pod annotation, enter the storage capacity to be added. The value ranges from 0 to 994. Click Confirm.
      NOTE:

      After this annotation is added to the pod, the ephemeral storage per pod in the area for confirming the specifications changes from 30 GiB to 40 GiB (the default pod storage plus the added ephemeral storage).

      Figure 1 Adding ephemeral storage for a pod

      Figure 2 Single-Pod Ephemeral Storage

    Modifying the ephemeral storage for a pod

    40 GiB

    1. In the area for confirming the specifications, click the edit icon next to Single-Pod Ephemeral Storage.
    2. In the displayed dialog box, enter the required capacity. The required capacity is the sum of the default 30-GiB capacity and the ephemeral storage to be added. The value ranges from 30 to 1024.
      NOTICE:

      If you are not sure how much ephemeral storage needs to be added for a pod, retain the recommended value, which is the value of Single-Pod Ephemeral Storage. After an image is selected, the recommended value will be calculated based on the size of the selected image and the storage capacity required by the OS. The recommended ephemeral storage for a pod is either the 30-GiB free storage or the sum of system storage and 2-fold image size, whichever is greater. (Formula: Recommended ephemeral storage for a pod = Max. (30-GiB free storage, Sum of system storage and image size x 2))

      Figure 3 Modifying the ephemeral storage for a pod

    3. Click OK.

  4. Select I have read and agree to the pricing policy and click Create Workload or Upgrade Workload.

You can run kubectl commands to add ephemeral storage capacity for a pod. You can add ephemeral storage capacity when creating a workload or modify the ephemeral storage for a pod of an existing workload. For details about workload parameters, see Creating a Workload.

Command line operations are required. You can perform related operations in either of the following ways:

  • Use the command line tool in the cluster. The kubectl commands have been configured for the command line tool, which has been connected to the cluster.
  • Log in to an ECS that is in the same VPC as the cluster, and access the cluster using kubectl by following the instructions in Connecting to a Cluster Using kubectl.