Updated on 2025-08-12 GMT+08:00

Adding Ephemeral Storage Capacity

This topic describes how to add ephemeral storage capacity when a large amount of data is written or a large image is used.

Scenario

If the pod needs to write a large amount of data to rootfs or emptyDir or if the image size is greater than 30 GiB, you need to expand the ephemeral storage capacity.

Precautions

The maximum ephemeral storage capacity is 994 GiB.

Procedure

  1. Log in to the CCI 2.0 console. In the navigation pane, choose Workloads. On the Deployments tab, click Create from YAML.

  2. Fill in the YAML file as follows:

    kind: Deployment
    apiVersion: cci/v2
    metadata:
      name: nginx
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: nginx
      template:
        metadata:
          labels:
            app: nginx
        spec:
          containers:
            - name: nginx
              image: nginx:latest
              resources:
                limits:
                  cpu: 500m
                  memory: 1Gi
                requests:
                  cpu: 500m
                  memory: 1Gi
          dnsPolicy: Default
          extraEphemeralStorage: 
            sizeInGiB: 10 # Ephemeral storage capacity to be added, in GiB

  3. Go to the workload details page. On the Pods tab, locate the target pod and click View Terminal in the Operation column.

  4. Enter lsblk and press Enter to check the system disk size after the expansion. (The ephemeral storage capacity is 30 GiB by default.)