Updated on 2024-01-29 GMT+08:00

FlexVolume Overview

In container storage, you can use different types of volumes and mount them to containers in pods as many as you want.

In CCE, container storage is backed both by Kubernetes-native objects, such as emptyDir, hostPath, secret, and ConfigMap, and by cloud storage services.

CCE clusters of 1.13 and earlier versions use the storage-driver add-on to connect to cloud storage services to support Kubernetes FlexVolume driver for container storage. The FlexVolume driver has been deprecated in favor of the Container Storage Interface (CSI). The Everest add-on for CSI is installed in CCE clusters of 1.15 and later versions by default. For details, see Overview.

  • In CCE clusters earlier than Kubernetes 1.13, end-to-end capacity expansion of container storage is not supported, and the PVC capacity is inconsistent with the storage capacity.
  • In a cluster of v1.13 or earlier, when an upgrade or bug fix is available for storage functionalities, you only need to install or upgrade the storage-driver add-on. Upgrading the cluster or creating a cluster is not required.

Constraints

  • For clusters created in CCE, Kubernetes v1.15.11 is a transitional version in which the FlexVolume plugin (storage-driver) is compatible with the CSI plugin (Everest). Clusters of v1.17 and later versions do not support FlexVolume anymore. Use the Everest add-on.
  • The FlexVolume plugin storage-driver will be maintained by Kubernetes developers, but new functionality will only be added to CSI CCE Container Storage (Everest). Do not create storage that access the FlexVolume storage-driver in CCE anymore. Otherwise, the storage resources may not function properly.

Checking Storage Add-ons

  1. Log in to the CCE console.
  2. In the navigation tree on the left, click Add-ons.
  3. Click the Add-on Instance tab.
  4. Select a cluster in the upper right corner. The default storage add-on installed during cluster creation is displayed.

Differences Between CSI and FlexVolume Plug-ins

Table 1 CSI and FlexVolume

Kubernetes Solution

CCE Add-on

Feature

Recommendation

CSI

Everest

CSI was developed as a standard for exposing arbitrary block and file storage storage systems to containerized workloads. Using CSI, third-party storage providers can deploy plugins exposing new storage systems in Kubernetes without having to touch the core Kubernetes code. In CCE, the everest add-on is installed by default in clusters of Kubernetes v1.15 and later to connect to storage services (EVS, OBS, SFS, and SFS Turbo).

The everest add-on consists of two parts:

  • everest-csi-controller for storage volume creation, deletion, capacity expansion, and cloud disk snapshots
  • everest-csi-driver for mounting, unmounting, and formatting storage volumes on nodes

For details, see everest.

The everest add-on is installed by default in clusters of v1.15 and later. CCE will mirror the Kubernetes community by providing continuous support for updated CSI capabilities.

Flexvolume

storage-driver

FlexVolume is an out-of-tree plugin interface that has existed in Kubernetes since version 1.2 (before CSI). CCE provided FlexVolume volumes through the storage-driver add-on installed in clusters of Kubernetes v1.13 and earlier versions. This add-on connects clusters to storage services (EVS, OBS, SFS, and SFS Turbo).

For details, see storage-driver.

For the created clusters of v1.13 or earlier, the installed FlexVolume plug-in (CCE add-on storage-driver) can still be used. CCE stops providing update support for this add-on, and you are advised to upgrade these clusters.

  • A cluster can use only one type of storage plug-ins.
  • The FlexVolume plug-in cannot be replaced by the CSI plug-in in clusters of v1.13 or earlier. You can only upgrade these clusters. For details, see Cluster Upgrade.