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
@@ -16,38 +16,26 @@ This article describes how to create and use storage classes in AKS enabled by A
16
16
17
17
## Prerequisites
18
18
19
-
Storage classes in AKS enabled by Azure Arc are supported in the following regions:
19
+
To use the storage classes feature, you must have an AKS Arc cluster in the following currently available regions:
20
20
21
-
- eastus2euap (canary)
22
-
- eastus
23
-
- eastus2
24
-
- westus
25
-
- westus2
21
+
- East US (eastus)
22
+
- West Europe (westeurope)
23
+
- Australia East (australiaeast)
24
+
- Southeast Asia (southeastasia)
25
+
- Central India (centralindia)
26
+
- Canada Central (canadacentral)
27
+
- Japan East (japaneast)
28
+
- South Central US (southcentralus)
26
29
27
-
During the preview, we recommend that you have an AKS Arc cluster in order to use this feature. If you don't have an AKS Arc cluster, you can also try this feature with any Arc-connected cluster. The following Azure CLI commands create an AKS instance and a connected cluster on top of that instance:
28
-
29
-
```azurecli
30
-
$rg = "<rg>"
31
-
$location = "eastus2euap"
32
-
$aksName = "testcanaryaks3"
33
-
$arcName = "$aksName-arc"
34
-
35
-
az aks create --location $location --resource-group $rg --name $aksName --os-sku AzureLinux
36
-
az aks get-credentials --name $aksName --resource-group $rg
37
-
az connectedk8s connect --name $arcName --resource-group $rg --location $location
38
-
```
39
-
40
-
To use the feature with Azure CLI, you must also have Azure CLI installed and set up on your machine, and install the `k8s-runtime` extension via the following command:
30
+
If you want to use the storage classes feature with Azure CLI, you must also have Azure CLI installed and set up on your machine, and install the `k8s-runtime` extension via the following command:
41
31
42
32
```azurecli
43
33
az extension add --name k8s-runtime
44
34
```
45
35
46
36
## [Azure portal](#tab/portal)
47
37
48
-
During the preview, our publicly available portal extension only targets provisioned clusters and is behind the feature flag `managedstorageclass` of the `Microsoft_Azure_HybridCompute` extension. [Use this link to show the link for provisioned clusters](https://portal.azure.com/?Microsoft_Azure_HybridCompute_managedstorageclass=true). The example in this article uses a provisioned cluster for demonstration purposes.
49
-
50
-
If you have other connected clusters, you can [use this link to access the cluster](https://ms.portal.azure.com/?microsoft_azure_managedstorageclass_assettypeoptions=%7B%22ConnectedClusterWithStorageClassPlus%22%3A%7B%22options%22%3A%22%22%7D%7Dµsoft_azure_managedstorageclass=stagepreview&feature.canmodifyextensions=trueµsoft_azure_hybridcompute_assettypeoptions=%7B%22ConnectedClusters%22%3A%7B%22options%22%3A%22HideAssetType%2CHideInstances%22%7D%7D#home). This link overrides the original connected cluster blade with our custom blade, with a link to the Storage Class feature for all connected clusters.
38
+
During the preview, our publicly available portal extension is behind the feature flag `managedstorageclass` of the `Microsoft_Azure_HybridCompute` extension. [Use this link to show the link for provisioned clusters](https://portal.azure.com/?Microsoft_Azure_HybridCompute_managedstorageclass=true). The example in this article uses a provisioned cluster for demonstration purposes.
51
39
52
40
### Enable the service
53
41
@@ -89,7 +77,7 @@ az k8s-runtime storage-class list --resource-uri <connecter cluster resource id>
89
77
90
78
## Create a storage class
91
79
92
-
This section describes how to create a storage class using the portal, or CLI.
80
+
This section describes how to create a storage class using the Azure portal, or Azure CLI.
93
81
94
82
### NFS
95
83
@@ -257,108 +245,6 @@ You can create a storage class that uses custom disks. This process is only for
257
245
|`storagePathId`|`string`| No | The resource ID for the storage path. |
258
246
|`fsType`|`string`\|`undefined`| No |`fsType` parameters for the storage class. If the storage class contains Linux workloads, set it to `ext4`. Otherwise, leave it undefined. |
| Performance |`performance`|`performance`|`Ultra`\|`Premium`\|`Standard`\|`NotAvailable`| The performance of the storage class. |
269
-
| Failover speed |`failoverSpeed`|`failover`|`Slow`\|`Fast`\|`Super`\|`NotAvailable`| How fast a pod using a volume of the storage class can recover when the pod is migrated to another node. |
270
-
| Access mode |`accssModes`|`accessModes`| Array of `ReadWriteOnce`\|`ReadWriteMany`\|`ReadOnlyMany`. | If a storage class supports an access mode, a volume of the storage class can be bound to the PVC if PVC specifies its `spec.accessModes` to the access mode. |
271
-
272
-
You can see the attribute detection results of a storage class in the cloud as described in the next section. If any detection failed or timed out, the property isn't available.
273
-
274
-
#### Azure portal
275
-
276
-
The attribute detection results are available in the list.
The result is also available in the `metadata.annotations` field of the storage class. To see the annotations of a storage class using `kubectl`, run the following command. If a detection fails or times out, the annotation is missing:
312
-
313
-
```powershell
314
-
# needs jq to be installed
315
-
> kubectl get sc $scName -o jsonpath='{.metadata.annotations}' | jq
When you create a Persistent Volume Claim (PVC), you can add the following annotations to the PVC, and the operator updates the storage class of the PVC with a storage class that has a capability equal to and higher than the level the annotation specifies.
This feature also considers **access modes**. If the PVC specifies `spec.accessModes`, the service only chooses storage classes that either support all of the PVC's `spec.accessModes`, or that didn't detect their supported access modes.
334
-
335
-
For example, the following YAML code creates a PVC that requires a storage class that has at least the `Standard` performance level, and supports the `ReadWriteOnce` access mode.
336
-
337
-
```yaml
338
-
apiVersion: v1
339
-
kind: PersistentVolumeClaim
340
-
metadata:
341
-
name: mypvc
342
-
namespace: tst
343
-
annotations:
344
-
arcsc.microsoft.com/require-performance: Standard
345
-
spec:
346
-
resources:
347
-
requests:
348
-
storage: 10G
349
-
volumeMode: Filesystem
350
-
accessModes:
351
-
- ReadWriteOnce
352
-
```
353
-
354
-
If there are multiple storage classes that match the criteria, the priority indicated by the `arcsc.microsoft.com/priority` annotation is used, and the one with the highest priority wins. If the annotation value doesn't exist or isn't a valid `int64` value, the priority is `0`. If there are multiple matching storage classes with the same priority, the names of the storage classes are sorted alphabetically, and the first one wins.
355
-
356
-
If there are no storage classes that match the criteria, the PVC creation is rejected, and generates an error message:
357
-
358
-
```output
359
-
Error from server: error when creating ".\\requirements.yaml": admission webhook "mpvc.kb.io" denied the request: No storage class found for specified requirement annotations
360
-
```
361
-
362
248
## Next steps
363
249
364
250
[Storage class overview](storage-class-overview.md)
Storage is key to most applications. Kubernetes uses a *storage class* to describe classes (types) of storage. Pods use storage class to request storage, and when the pod is up and running, volumes of requested storage class are mounted to the pod so that the pod can access their contents. Implementation details, including how the volumes are provisioned and mounted, and how the files are stored, are handled by storage addons to the storage class.
16
+
Storage is key to most applications. Kubernetes uses *storage classes* to describe classes (types) of storage. Pods use storage classes to request storage, and when the pod is up and running, volumes of requested storage classes are mounted to the pod so that the pod can access their contents. Implementation details, including how the volumes are provisioned and mounted, and how the files are stored, are handled by storage addons to the storage class.
17
17
18
18
*Container Storage Interface (CSI)* is the interface that Kubernetes uses to handle different storage classes. Different storage types provide storage addons that implement the CSI for specific storage classes.
19
19
@@ -37,39 +37,6 @@ You might be already using network-attached storage (NAS) for storage pool and h
37
37
38
38
If your company runs Windows Server clusters like HCI, these clusters usually use SMB drives for storage. Arc Storage Class provides SMB storage classes so these existing clusters can be easily used by your new Arc-connected Kubernetes cluster.
39
39
40
-
### Scenario 3: Use Azure Storage to expand storage
41
-
42
-
Azure Storage (blobs) are a good way to get large amounts of storage without the cost of building and maintaining new infrastructure. To adopt Azure blobs in your cluster, the only thing you need to do is create an account on Azure, and then create an Azure blobs storage class with the Arc Storage Class service. The files are stored and managed by Azure blobs, and you only pay for how much you actually used.
43
-
44
-
### Scenario 4: Extend capabilities on existing storage classes
45
-
46
-
Arc Storage Class also provides software solutions to extend capabilities on existing storage classes. For example, most existing storage solutions don't provide RWX capabilities, but a volume supporting RWX is required for SQL Managed Instance enabled by Azure. The Arc Storage Class service can create a new RWX supported storage class on top of an arbitrary existing storage class, so that you can use existing storage classes on scenarios that require RWX capabilities, even though the underlying storage class itself doesn't support RWX.
47
-
48
-
## Describe and detect storage class capabilities
49
-
50
-
Different storage types have different capabilities (attributes), such as performance, failover speed (how fast a pod using the storage class can recover when the pod is migrated to another node), and access modes (whether the volume can be read or written by multiple nodes simultaneously). These characteristics are important when choosing the right storage class for an application. For example, frequently accessed data should be in a volume with better performance. Unfortunately, there is not a standard mechanism in Kubernetes to express or detect these characteristics. As a result, storage class selection has to be done manually, which can be repetitive, time wasting and error prone.
51
-
52
-
The Arc Storage Class service provides a way to describe and detect the capability attributes of storage classes. We defined standardized keys and values that describe different capability attributes of storage classes. When the Arc Storage Service is enabled on a cluster, the service automatically runs attribute detection scripts on all storage classes in the cluster and, when it's finished, writes the results with these standardized keys and values. If some attributes fail to be detected or can't be detected automatically, you can also manually define attributes.
With the attributes detected and recorded, the process to decide which storage class to use in an application can also be simplified. Instead of specifically choosing which storage class to use, you can list only the requirements for storage class attributes, and our service automatically chooses a storage class that matches these requirements.
57
-
58
-
## Automatically configure storage for Arc services
59
-
60
-
You can deploy Azure Arc enabled services to your Arc connected Kubernetes clusters. To ensure flexibility in the deployment, the service usually uses the storage classes that are already on the cluster. But Azure Arc services cannot directly access the storage classes in user cluster and have no knowledge of the capabilities of the storage classes, so deciding what storage class should be used for storage is left to the user.
61
-
62
-
The Arc Storage Class service provides an inventory of storage classes on the cloud, synchronized with user cluster information. The Arc Storage Class service synchronizes the storage class information between the cloud and the cluster side, including basic Kubernetes information (names, provisioners, and so on) and capability attributes that are automatically detected or manually defined. Therefore, Azure Arc services can get access to the storage classes and their capability attributes and can help you query and filter the right storage classes when the service is created.
63
-
64
-
For example, creating a [SQL Managed Instance enabled by Azure Arc](/azure/azure-arc/data/managed-instance-overview) requires you to select four different storage classes for different usage (data, data-logs, logs, and backups). To simplify the process, SQL Managed Instance enabled by Azure Arc provides templates that automatically select storage classes for several common Kubernetes cluster configurations, but it's not flexible or helpful enough for other cluster configurations. With Arc Storage Class, the Arc service can help you with any cluster configuration query, and can recommend storage classes for each scenario automatically, completely eliminating the need for predefined templates.
65
-
66
-
:::image type="content" source="media/storage-class-overview/recommendations.png" alt-text="Screenshot showing storage class recommendations." lightbox="media/storage-class-overview/recommendations.png":::
67
-
68
-
## Platform neutral
69
-
70
-
The Storage Class service is available on any Kubernetes distributions, including Azure Kubernetes Service and AKS on HCI.
71
-
72
40
## Next steps
73
41
74
42
-[Create and use storage classes (preview)](create-storage-classes.md)
0 commit comments