You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Use Container Storage Interface (CSI) driver for Azure Blob storage on Azure Kubernetes Service (AKS)
3
-
description: Learn how to use the Container Storage Interface (CSI) driver for Azure Blob storage (preview) in an Azure Kubernetes Service (AKS) cluster.
3
+
description: Learn how to use the Container Storage Interface (CSI) driver for Azure Blob storage in an Azure Kubernetes Service (AKS) cluster.
# Use Azure Blob storage Container Storage Interface (CSI) driver
12
12
13
-
The Azure Blob storage Container Storage Interface (CSI) driver (preview) is a [CSI specification][csi-specification]-compliant driver used by Azure Kubernetes Service (AKS) to manage the lifecycle of Azure Blob storage. The CSI is a standard for exposing arbitrary block and file storage systems to containerized workloads on Kubernetes.
13
+
The Azure Blob storage Container Storage Interface (CSI) driver is a [CSI specification][csi-specification]-compliant driver used by Azure Kubernetes Service (AKS) to manage the lifecycle of Azure Blob storage. The CSI is a standard for exposing arbitrary block and file storage systems to containerized workloads on Kubernetes.
14
14
15
15
By adopting and using CSI, AKS now can write, deploy, and iterate plug-ins to expose new or improve existing storage systems in Kubernetes. Using CSI drivers in AKS avoids having to touch the core Kubernetes code and wait for its release cycles.
16
16
@@ -20,91 +20,27 @@ Mounting Azure Blob storage as a file system into a container or pod, enables yo
20
20
* Images, documents, and streaming video or audio
21
21
* Disaster recovery data
22
22
23
-
The data on the object storage can be accessed by applications using BlobFuse or Network File System (NFS) 3.0 protocol. Before the introduction of the Azure Blob storage CSI driver (preview), the only option was to manually install an unsupported driver to access Blob storage from your application running on AKS. When the Azure Blob storage CSI driver (preview) is enabled on AKS, there are two built-in storage classes: *azureblob-fuse-premium* and *azureblob-nfs-premium*.
23
+
The data on the object storage can be accessed by applications using BlobFuse or Network File System (NFS) 3.0 protocol. Before the introduction of the Azure Blob storage CSI driver, the only option was to manually install an unsupported driver to access Blob storage from your application running on AKS. When the Azure Blob storage CSI driver is enabled on AKS, there are two built-in storage classes: *azureblob-fuse-premium* and *azureblob-nfs-premium*.
24
+
25
+
> [!NOTE]
26
+
> Azure Blob CSI driver only supports NFS 3.0 protocol for Kubernetes versions 1.25 (preview) on AKS.
24
27
25
28
To create an AKS cluster with CSI drivers support, see [CSI drivers on AKS][csi-drivers-aks]. To learn more about the differences in access between each of the Azure storage types using the NFS protocol, see [Compare access to Azure Files, Blob Storage, and Azure NetApp Files with NFS][compare-access-with-nfs].
26
29
27
-
## Azure Blob storage CSI driver (preview) features
30
+
## Azure Blob storage CSI driver features
28
31
29
-
Azure Blob storage CSI driver (preview) supports the following features:
32
+
Azure Blob storage CSI driver supports the following features:
30
33
31
34
- BlobFuse and Network File System (NFS) version 3.0 protocol
32
35
33
36
## Before you begin
34
37
35
-
- The Azure CLI version 2.37.0 or later. Run `az --version` to find the version, and run `az upgrade` to upgrade the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
36
-
37
-
- Install the aks-preview Azure CLI extension version 0.5.85 or later.
38
-
39
-
- If the open-source CSI Blob storage driver is installed on your cluster, uninstall it before enabling the preview driver.
38
+
Review the prerequisites listed in the [CSI storage drivers overview][csi-storage-driver-overview] article to verify the requirements before using this feature.
40
39
41
40
### Uninstall open-source driver
42
41
43
42
Perform the steps in this [link][csi-blob-storage-open-source-driver-uninstall-steps] if you previously installed the [CSI Blob Storage open-source driver][csi-blob-storage-open-source-driver] to access Azure Blob storage from your cluster.
44
43
45
-
## Install the Azure CLI aks-preview extension
46
-
47
-
The following steps are required to install and register the Azure CLI aks-preview extension and driver in your subscription.
48
-
49
-
1. To use the Azure CLI aks-preview extension for enabling the Blob storage CSI driver (preview) on your AKS cluster, run the following command to install it:
50
-
51
-
```azurecli
52
-
az extension add --name aks-preview
53
-
```
54
-
55
-
2. Run the following command to register the CSI driver (preview):
56
-
57
-
```azurecli
58
-
az feature register --name EnableBlobCSIDriver --namespace Microsoft.ContainerService
59
-
```
60
-
61
-
3. To register the provider, run the following command:
62
-
63
-
```azurecli
64
-
az provider register -n Microsoft.ContainerService
65
-
```
66
-
67
-
When newer versions of the extension are released, run the following command to upgrade the extension to the latest release:
68
-
69
-
```azurecli
70
-
az extension update --name aks-preview
71
-
```
72
-
73
-
## Enable CSI driver on a new or existing AKS cluster
74
-
75
-
Using the Azure CLI, you can enable the Blob storage CSI driver (preview) on a new or existing AKS cluster before you configure a persistent volume for use by pods in the cluster.
76
-
77
-
To enable the driver on a new cluster, include the `--enable-blob-driver` parameter with the `az aks create` command as shown in the following example:
78
-
79
-
```azurecli
80
-
az aks create --enable-blob-driver -n myAKSCluster -g myResourceGroup
81
-
```
82
-
83
-
To enable the driver on an existing cluster, include the `--enable-blob-driver` parameter with the `az aks update` command as shown in the following example:
84
-
85
-
```azurecli
86
-
az aks update --enable-blob-driver -n myAKSCluster -g myResourceGroup
87
-
```
88
-
89
-
You're prompted to confirm there isn't an open-source Blob CSI driver installed. After confirming, it may take several minutes to complete this action. Once it's complete, you should see in the output the status of enabling the driver on your cluster. The following example is resembles the section indicating the results of the previous command:
90
-
91
-
```output
92
-
"storageProfile": {
93
-
"blobCsiDriver": {
94
-
"enabled": true
95
-
},
96
-
```
97
-
98
-
## Disable CSI driver on an existing AKS cluster
99
-
100
-
Using the Azure CLI, you can disable the Blob storage CSI driver on an existing AKS cluster after you remove the persistent volume from the cluster.
101
-
102
-
To disable the driver on an existing cluster, include the `--disable-blob-driver` parameter with the `az aks update` command as shown in the following example:
103
-
104
-
```azurecli
105
-
az aks update --disable-blob-driver -n myAKSCluster -g myResourceGroup
106
-
```
107
-
108
44
## Use a persistent volume with Azure Blob storage
109
45
110
46
A [persistent volume][persistent-volume] (PV) represents a piece of storage that's provisioned for use with Kubernetes pods. A PV can be used by one or many pods and can be dynamically or statically provisioned. If multiple pods need concurrent access to the same storage volume, you can use Azure Blob storage to connect by using the Network File System (NFS) or blobfuse. This article shows you how to dynamically create an Azure Blob storage container for use by multiple pods in an AKS cluster.
@@ -120,7 +56,7 @@ A storage class is used to define how an Azure Blob storage container is created
120
56
***Standard_GRS**: Standard geo-redundant storage
121
57
***Standard_RAGRS**: Standard read-access geo-redundant storage
122
58
123
-
When you use storage CSI drivers on AKS, there are two additional built-in StorageClasses that use the Azure Blob CSI storage driver (preview).
59
+
When you use storage CSI drivers on AKS, there are two additional built-in StorageClasses that use the Azure Blob CSI storage driver.
124
60
125
61
The reclaim policy on both storage classes ensures that the underlying Azure Blob storage is deleted when the respective PV is deleted. The storage classes also configure the container to be expandable by default, as the `set allowVolumeExpansion` parameter is set to **true**.
126
62
@@ -244,49 +180,23 @@ To have a storage volume persist for your workload, you can use a StatefulSet. T
244
180
245
181
- To learn how to manually set up a static persistent volume, see [Create and use a volume with Azure Blob storage][azure-csi-blob-storage-static].
246
182
- To learn how to dynamically set up a persistent volume, see [Create and use a dynamic persistent volume with Azure Blob storage][azure-csi-blob-storage-dynamic].
247
-
- To learn how to use CSI driver for Azure Disks, see [Use Azure Disks with CSI driver](azure-disk-csi.md).
248
-
- To learn how to use CSI driver for Azure Files, see [Use Azure Files with CSI driver](azure-files-csi.md).
183
+
- To learn how to use CSI driver for Azure Disks, see [Use Azure Disks with CSI driver][azure-disk-csi-driver]
184
+
- To learn how to use CSI driver for Azure Files, see [Use Azure Files with CSI driver][azure-files-csi-driver]
249
185
- For more about storage best practices, see [Best practices for storage and backups in Azure Kubernetes Service][operator-best-practices-storage].
Copy file name to clipboardExpand all lines: articles/aks/csi-storage-drivers.md
+24-42Lines changed: 24 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,7 @@ title: Container Storage Interface (CSI) drivers on Azure Kubernetes Service (AK
3
3
description: Learn about and deploy the Container Storage Interface (CSI) drivers for Azure Disks and Azure Files in an Azure Kubernetes Service (AKS) cluster
4
4
services: container-service
5
5
ms.topic: article
6
-
ms.date: 09/18/2022
7
-
author: palma21
6
+
ms.date: 11/16/2022
8
7
9
8
---
10
9
@@ -28,34 +27,39 @@ The CSI storage driver support on AKS allows you to natively use:
28
27
29
28
## Prerequisites
30
29
31
-
You need the Azure CLI version 2.40 installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
30
+
- You need the Azure CLI version 2.42 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
31
+
- If the open-source CSI Blob storage driver is installed on your cluster, uninstall it before enabling the Azure Blob storage driver.
32
32
33
-
## Disable CSI storage drivers on a new cluster
33
+
## Disable CSI storage drivers on a new or existing cluster
34
34
35
-
`--disable-disk-driver` allows you to disable the [Azure Disks CSI driver][azure-disk-csi]. `--disable-file-driver` allows you to disable the [Azure Files CSI driver][azure-files-csi]. `--disable-snapshot-controller` allows you to disable the [snapshot controller][snapshot-controller ].
35
+
To disable CSI storage drivers on a new cluster, include one of the following parameters depending on the storage system:
36
36
37
-
To disable CSI storage drivers on a new cluster, use `--disable-disk-driver`, `--disable-file-driver`, and `--disable-snapshot-controller`.
37
+
*`--disable-disk-driver` allows you to disable the [Azure Disks CSI driver][azure-disk-csi].
38
+
*`--disable-file-driver` allows you to disable the [Azure Files CSI driver][azure-files-csi].
39
+
*`--disable-blob-driver` allows you to disable the [Azure Blob storage CSI driver][azure-blob-csi].
40
+
*`--disable-snapshot-controller` allows you to disable the [snapshot controller][snapshot-controller].
38
41
39
42
```azurecli
40
-
az aks create -n myAKSCluster -g myResourceGroup --disable-disk-driver --disable-file-driver --disable-snapshot-controller
43
+
az aks create -n myAKSCluster -g myResourceGroup --disable-disk-driver --disable-file-driver --disable-blob-driver --disable-snapshot-controller
41
44
```
42
45
43
-
## Disable CSI storage drivers on an existing cluster
44
-
45
-
To disable CSI storage drivers on an existing cluster, use `--disable-disk-driver`, `--disable-file-driver`, and `--disable-snapshot-controller`.
46
+
To disable CSI storage drivers on an existing cluster, use one of the parameters listed earlier depending on the storage system:
46
47
47
48
```azurecli
48
-
az aks update -n myAKSCluster -g myResourceGroup --disable-disk-driver --disable-file-driver --disable-snapshot-controller
49
+
az aks update -n myAKSCluster -g myResourceGroup --disable-disk-driver --disable-file-driver --disable-blob-driver --disable-snapshot-controller
49
50
```
50
51
51
52
## Enable CSI storage drivers on an existing cluster
52
53
53
-
`--enable-disk-driver` allows you enable the [Azure Disks CSI driver][azure-disk-csi]. `--enable-file-driver` allows you to enable the [Azure Files CSI driver][azure-files-csi]. `--enable-snapshot-controller` allows you to enable the [snapshot controller][snapshot-controller].
54
+
To enable CSI storage drivers on a new cluster, include one of the following parameters depending on the storage system:
54
55
55
-
To enable CSI storage drivers on an existing cluster with CSI storage drivers disabled, use `--enable-disk-driver`, `--enable-file-driver`, and `--enable-snapshot-controller`.
56
+
*`--enable-disk-driver` allows you to enable the [Azure Disks CSI driver][azure-disk-csi].
57
+
*`--enable-file-driver` allows you to enable the [Azure Files CSI driver][azure-files-csi].
58
+
*`--enable-blob-driver` allows you to enable the [Azure Blob storage CSI driver][azure-blob-csi].
59
+
*`--enable-snapshot-controller` allows you to enable the [snapshot controller][snapshot-controller].
56
60
57
61
```azurecli
58
-
az aks update -n myAKSCluster -g myResourceGroup --enable-disk-driver --enable-file-driver --enable-snapshot-controller
62
+
az aks update -n myAKSCluster -g myResourceGroup --enable-disk-driver --enable-file-driver --enable-blob-driver --enable-snapshot-controller
59
63
```
60
64
61
65
## Migrate custom in-tree storage classes to CSI
@@ -115,43 +119,21 @@ If you have in-tree Azure File persistent volumes, get `secretName`, `shareName`
115
119
116
120
## Next steps
117
121
118
-
- To use the CSI driver for Azure Disks, see [Use Azure Disks with CSI drivers](azure-disk-csi.md).
119
-
- To use the CSI driver for Azure Files, see [Use Azure Files with CSI drivers](azure-files-csi.md).
120
-
- To use the CSI driver for Azure Blob storage, see [Use Azure Blob storage with CSI drivers](azure-blob-csi.md)
122
+
- To use the CSI driver for Azure Disks, see [Use Azure Disks with CSI drivers][azure-disk-csi].
123
+
- To use the CSI driver for Azure Files, see [Use Azure Files with CSI drivers][azure-files-csi].
124
+
- To use the CSI driver for Azure Blob storage, see [Use Azure Blob storage with CSI drivers][azure-blob-csi]
121
125
- For more about storage best practices, see [Best practices for storage and backups in Azure Kubernetes Service][operator-best-practices-storage].
122
126
- For more information on CSI migration, see [Kubernetes In-Tree to CSI Volume Migration][csi-migration-community].
0 commit comments