All Products
Search
Document Center

Container Service for Kubernetes:Install and upgrade the FlexVolume component

Last Updated:Nov 04, 2026

When you create a Container Service for Kubernetes (ACK) cluster that runs a Kubernetes version earlier than 1.16 and select FlexVolume as the volume plug-in, the console automatically installs the FlexVolume and Disk Controller components. However, the alicloud-nas-controller component is not installed by default. This topic describes how to upgrade the FlexVolume component and install the alicloud-nas-controller component.

Prerequisites

Precautions

If the alicloud-nas-controller component is deployed in your cluster, you must upgrade its image to v1.14.8.17-7b898e5-aliyun or later before you upgrade the cluster to Kubernetes 1.20.

Note

If you use a community solution, such as nfs-provisioner, instead of the alicloud-nas-controller component provided by Alibaba Cloud, you must find a corresponding upgrade solution from the community to prevent selfLink issues.

Limitations

Only CentOS 7 and Alibaba Cloud Linux 2 are supported.

Install components

Install the FlexVolume component

  • The FlexVolume component is not supported in ACK clusters running Kubernetes 1.16 or later. You must use the CSI-Plugin component instead. For more information, see Storage overview.

  • For ACK clusters running a Kubernetes version earlier than 1.16, the FlexVolume component is installed by default if you select FlexVolume as the volume plug-in when you create the cluster. For more information, see Configure components.

Install the Disk Controller component

  • The Disk Controller component is not supported in ACK clusters running Kubernetes 1.16 or later. You must use the CSI-Provisioner component instead. For more information, see Storage overview.

  • For ACK clusters running a Kubernetes version earlier than 1.16, the Disk Controller component is installed by default if you select FlexVolume as the volume plug-in when you create the cluster. For more information, see Configure components.

Install the alicloud-nas-controller component

If your cluster uses FlexVolume as the volume plug-in, you can manually deploy the alicloud-nas-controller component to dynamically provision File Storage NAS (NAS) volumes.

Use the following YAML template to manually install the component.

kind: Deployment
apiVersion: apps/v1
metadata:
  name: alicloud-nas-controller
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: alicloud-nas-controller
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: alicloud-nas-controller
    spec:
      tolerations:
      - operator: Exists
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            preference:
              matchExpressions:
              - key: node-role.kubernetes.io/master
                operator: Exists
      priorityClassName: system-node-critical
      serviceAccount: admin
      hostNetwork: true
      containers:
        - name: nfs-provisioner
          image: registry.cn-hangzhou.aliyuncs.com/acs/alicloud-nas-controller:v1.14.8.17-7b898e5-aliyun
          env:
          - name: PROVISIONER_NAME
            value: alicloud/nas
          securityContext:
            privileged: true
          volumeMounts:
          - mountPath: /var/log
            name: log
      volumes:
      - hostPath:
          path: /var/log
        name: log

Verify the installation

Verify that the FlexVolume, Disk Controller, and alicloud-nas-controller components are deployed.

  • Run the following command to check for the FlexVolume component:

    kubectl get pod -nkube-system | grep flexvolume
  • Run the following command to check for the Disk Controller component:

    kubectl get pod -nkube-system | grep alicloud-disk-controller
  • Run the following command to check for the alicloud-nas-controller component:

    kubectl get pod -nkube-system | grep alicloud-nas-controller

Upgrade components

You can upgrade the FlexVolume and Disk Controller components in the ACK console. The alicloud-nas-controller component cannot be upgraded in the console.

If you upgrade an ACK cluster from a version earlier than Kubernetes 1.16 to 1.16 or later, the cluster continues to support the FlexVolume volume plug-in. You can then upgrade the plug-in in the ACK console.

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Components and Add-ons .

  3. Click the Storage tab. In the flexvolume or alicloud-disk-controller component section, click Upgrade.

  4. In the Note dialog box, confirm the version information and click OK.

    After the upgrade is complete, the component section shows a success message and the current version.

  • For FlexVolume upgrades, submit a ticket for manual support in the following scenarios:

    • The online upgrade fails.

    • The FlexVolume component version is v1.12 or earlier, and you use disks or OSS volumes.

    • Your workloads are sensitive, use a large number of volumes, and you want to ensure a smooth upgrade.

  • If the Disk Controller component upgrade fails, submit a ticket to request manual upgrade support.