If you specify FlexVolume as the volume plug-in for a Container Service for Kubernetes (ACK) cluster that runs Kubernetes earlier than 1.16, the system automatically installs FlexVolume and Disk Controller in the cluster. However, the system does not automatically install alicloud-nas-controller. This topic describes how to install and upgrade FlexVolume, and how to install alicloud-nas-controller.
Only the CentOS 7 and Alibaba Cloud Linux 2 operating systems are supported.
Install the components
- Clusters that run Kubernetes 1.16 and later do not support FlexVolume. You must install CSI-Plugin in these clusters. For more information, see Differences between the CSI and FlexVolume plug-ins.
- If you specify FlexVolume as the volume plug-in for an ACK cluster that runs Kubernetes earlier than 1.16, the system automatically installs FlexVolume in the cluster. For more information, see Component configurations.
Install Disk Controller
- Clusters of ACK 1.16 and later do not support Disk Controller. You must install CSI-Provisioner in these clusters. For more information, see Differences between the CSI and FlexVolume plug-ins.
- If you specify FlexVolume as the volume plug-in for an ACK cluster that runs Kubernetes earlier than 1.16, the system automatically installs Disk Controller in the cluster. For more information, see Component configurations.
If FlexVolume is installed in your cluster, you can manually install alicloud-nas-controller, and then dynamically provision volumes that use Apsara File Storage NAS (NAS) file systems.
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:v18.104.22.168-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
Check whether FlexVolume, Disk Controller, and alicloud-nas-controller are installed in the cluster.
- Run the following command to check whether FlexVolume is installed in the cluster:
kubectl get pod -nkube-system | grep flexvolume
- Run the following command to check whether Disk Controller is installed in the cluster:
kubectl get pod -nkube-system | grep alicloud-disk-controller
- Run the following command to check whether alicloud-nas-controller is installed in
kubectl get pod -nkube-system | grep alicloud-nas-controller
Upgrade the components
You can upgrade FlexVolume and Disk Controller in the ACK console. You cannot upgrade alicloud-nas-controller in the ACK console.
If the Kubernetes version of your ACK cluster is upgraded to 1.16 or later, the cluster still supports FlexVolume. You can upgrade FlexVolume in the ACK console.
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, find the cluster that you want to manage and click the name of the cluster or click Details in the Actions column. The details page of the cluster appears.
- In the left-side navigation pane of the details page, choose .
- Click the Storage tab, find flexvolume and alicloud-disk-controller, and then click Upgrade.
- In the Note message, confirm the versions of the plug-ins and click OK. After the plug-ins are upgraded, the system prompts that the upgrades are completed and the current versions of the plug-ins are displayed.
- When you upgrade FlexVolume in the following scenarios, Submit a ticket to request technical support.
- The system fails to update FlexVolume in the ACK console.
- The version of FlexVolume is 1.12 or earlier, and volumes that use disks and Object Storage Service (OSS) buckets are provisioned in the cluster.
- You want to ensure a successful upgrade because sensitive business data is stored in the cluster and a large number of volumes are used.
- The system fails to upgrade Disk Controller. In this case, Submit a ticket to request technical support.