Skip to content

Commit 2baad39

Browse files
Merge pull request #229831 from khdownie/kendownie-acstor-preview
Azure Container Storage preview
2 parents 872b8c0 + edd6489 commit 2baad39

9 files changed

+1081
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
- name: Azure Container Storage documentation
2+
href: index.yml
3+
- name: Overview
4+
expanded: true
5+
items:
6+
- name: What is Azure Container Storage?
7+
href: container-storage-introduction.md
8+
- name: Quickstarts
9+
items:
10+
- name: Install Azure Container Storage
11+
href: container-storage-aks-quickstart.md
12+
- name: How-to guides
13+
items:
14+
- name: Use with Azure Disks
15+
href: use-container-storage-with-managed-disks.md
16+
- name: Use with Ephemeral Disk
17+
href: use-container-storage-with-local-disk.md
18+
- name: Use with Azure Elastic SAN
19+
href: use-container-storage-with-elastic-san.md
20+
- name: Concepts
21+
items:
22+
- name: FAQ
23+
href: container-storage-faq.md
24+
- name: Reference
25+
items:
26+
- name: APIs for data access
27+
items:
28+
- name: REST API
29+
href: /rest/api/storageservices/
30+
- name: .NET SDK
31+
href: /dotnet/api/overview/azure/storage
32+
- name: Java SDK
33+
href: /java/api/overview/azure/storage
34+
- name: Python SDK
35+
href: /python/api/overview/azure/storage
36+
- name: JavaScript SDK
37+
href: /javascript/api/overview/azure/storage
38+
- name: APIs for resource management
39+
items:
40+
- name: REST API
41+
href: /rest/api/storagerp/
42+
- name: .NET SDK
43+
href: /dotnet/api/overview/azure/resourcemanager.storage-readme
44+
- name: Java SDK
45+
href: /java/api/overview/azure/storage/management
46+
- name: Python SDK
47+
href: /python/api/overview/azure/storage#management
48+
- name: JavaScript SDK
49+
href: /javascript/api/overview/azure/storage#management
50+
- name: Resource Manager template
51+
displayName: arm
52+
href: /azure/templates/microsoft.storage/allversions
53+
- name: Resources
54+
items:
55+
- name: Pricing for Azure Container Storage
56+
href: https://azure.microsoft.com/pricing/details/storage/container-storage
57+
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
---
2+
title: Quickstart for installing and configuring Azure Container Storage Preview with Azure Kubernetes Service (AKS)
3+
description: Learn how to install and configure Azure Container Storage Preview for use with Azure Kubernetes Service. You'll end up with new storage classes that you can use for your Kubernetes workloads.
4+
author: khdownie
5+
ms.service: storage
6+
ms.topic: quickstart
7+
ms.date: 05/15/2023
8+
ms.author: kendownie
9+
ms.subservice: container-storage
10+
---
11+
12+
# Quickstart: Install Azure Container Storage Preview for use with Azure Kubernetes Service
13+
[Azure Container Storage](container-storage-introduction.md) is a cloud-based volume management, deployment, and orchestration service built natively for containers. This Quickstart shows you how to configure and use Azure Container Storage for use with [Azure Kubernetes Service (AKS)](../../aks/intro-kubernetes.md). At the end, you'll have new storage classes that you can use for your Kubernetes workloads, and you can then create a storage pool using one of three block storage options.
14+
15+
[!INCLUDE [azure-cli-prepare-your-environment.md](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment.md)]
16+
17+
## Getting started
18+
19+
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
20+
21+
- Sign up for the public preview by completing the [onboarding survey](https://aka.ms/AzureContainerStoragePreviewSignUp).
22+
23+
- Make sure the identity you're using to create your AKS cluster has the appropriate minimum permissions. For more details, see [Access and identity options for Azure Kubernetes Service](../../aks/concepts-identity.md).
24+
25+
- This article requires version 2.0.64 or later of the Azure CLI. See [How to install the Azure CLI](/cli/azure/install-azure-cli). If you're using Azure Cloud Shell, the latest version is already installed. If you plan to run the commands in this quickstart locally instead of in Azure Cloud Shell, be sure to run them with administrative privileges.
26+
27+
- If you're using Azure Cloud Shell, you might be prompted to mount storage. Select the Azure subscription where you want to create the storage account and select **Create**.
28+
29+
- You'll need the Kubernetes command-line client, `kubectl`. It's already installed if you're using Azure Cloud Shell, or you can install it locally by running the `az aks install-cli` command.
30+
31+
## Create a resource group
32+
33+
An Azure resource group is a logical group that holds your Azure resources that you want to manage as a group. When you create a resource group, you're prompted to specify a location. This location is:
34+
35+
* The storage location of your resource group metadata.
36+
* Where your resources will run in Azure if you don't specify another region during resource creation.
37+
38+
> [!IMPORTANT]
39+
> Azure Container Storage Preview is only available in *eastus*, *westus2*, *westus3*, and *westeurope* regions.
40+
41+
1. Set your subscription context using the `az account set` command. You can view the subscription IDs for all the subscriptions you have access to by running the `az account list --output table` command. Remember to replace `<subscription-id>` with your subscription ID.
42+
43+
```azurecli-interactive
44+
az account set --subscription <subscription-id>
45+
```
46+
47+
2. Create a resource group using the `az group create` command. Replace `<resource-group-name>` with the name of the resource group you want to create, and replace `<location>` with *eastus*, *westus2*, *westus3*, or *westeurope*.
48+
49+
```azurecli-interactive
50+
az group create --name <resource-group-name> --location <location>
51+
```
52+
53+
If the resource group was created successfully, you'll see output similar to this:
54+
55+
```json
56+
{
57+
"id": "/subscriptions/<guid>/resourceGroups/myContainerStorageRG",
58+
"location": "eastus",
59+
"managedBy": null,
60+
"name": "myContainerStorageRG",
61+
"properties": {
62+
"provisioningState": "Succeeded"
63+
},
64+
"tags": null
65+
}
66+
```
67+
68+
## Choose a data storage option and virtual machine type
69+
70+
Before you create your cluster, you should understand which back-end storage option you'll ultimately choose to create your storage pool. This is because different storage services work best with different virtual machine (VM) types as cluster nodes, and you'll deploy your cluster before you create the storage pool.
71+
72+
### Data storage options
73+
74+
- **[Azure Elastic SAN Preview](../elastic-san/elastic-san-introduction.md)**: Azure Elastic SAN preview is a good fit for general purpose databases, streaming and messaging services, CD/CI environments, and other tier 1/tier 2 workloads. Storage is provisioned on demand per created volume and volume snapshot. Multiple clusters can access a single SAN concurrently, however persistent volumes can only be attached by one consumer at a time.
75+
76+
- **[Azure Disks](../../virtual-machines/managed-disks-overview.md)**: Azure Disks are a good fit for databases such as MySQL, MongoDB, and PostgreSQL. Storage is provisioned per target container storage pool size and maximum volume size.
77+
78+
- **Ephemeral Disk**: This option uses local NVMe drives on the AKS nodes and is extremely latency sensitive (low sub-ms latency), so it's best for applications with no data durability requirement or with built-in data replication support such as Cassandra. AKS discovers the available ephemeral storage on AKS nodes and acquires the drives for volume deployment.
79+
80+
### VM types
81+
82+
To use Azure Container Storage, you'll need a node pool of at least three Linux VMs. Each VM should have a minimum of four virtual CPUs (vCPUs). Azure Container Storage will consume one core for I/O processing on every VM the extension is deployed to.
83+
84+
If you intend to use Azure Elastic SAN Preview or Azure Disks with Azure Container Storage, then you should choose a [general purpose VM type](../../virtual-machines/sizes-general.md) such as **standard_d4s_v5** for the cluster nodes. The VMs must have standard hard disk drives (HDD), not SSD.
85+
86+
If you intend to use Ephemeral Disk, choose a [storage optimized VM type](../../virtual-machines/sizes-storage.md) with NVMe drives such as **standard_l8s_v3**. In order to use Ephemeral Disk, the VMs must have NVMe drives.
87+
88+
## Create AKS cluster
89+
90+
Run the following command to create a Linux-based AKS cluster and enable a system-assigned managed identity. Replace `<resource-group>` with the name of the resource group you created, `<cluster-name>` with the name of the cluster you want to create, and `<vm-type>` with the VM type you selected in the previous step. For this Quickstart, we'll create a cluster with three nodes. Increase the `--node-count` if you want a larger cluster.
91+
92+
```azurecli-interactive
93+
az aks create -g <resource-group> -n <cluster-name> --node-count 3 -s <vm-type> --generate-ssh-keys
94+
```
95+
96+
The deployment will take a few minutes to complete.
97+
98+
> [!NOTE]
99+
> When you create an AKS cluster, AKS automatically creates a second resource group to store the AKS resources. This second resource group follows the naming convention `MC_YourResourceGroup_YourAKSClusterName_Region`. For more information, see [Why are two resource groups created with AKS?](../../aks/faq.md#why-are-two-resource-groups-created-with-aks).
100+
101+
## Connect to the cluster
102+
103+
To connect to the cluster, use the Kubernetes command-line client, `kubectl`.
104+
105+
1. Configure `kubectl` to connect to your cluster using the `az aks get-credentials` command. The following command:
106+
107+
* Downloads credentials and configures the Kubernetes CLI to use them.
108+
* Uses `~/.kube/config`, the default location for the Kubernetes configuration file. You can specify a different location for your Kubernetes configuration file using the *--file* argument.
109+
110+
```azurecli-interactive
111+
az aks get-credentials --resource-group <resource-group> --name <cluster-name>
112+
```
113+
114+
2. Verify the connection to your cluster using the `kubectl get` command. This command returns a list of the cluster nodes.
115+
116+
```azurecli-interactive
117+
kubectl get nodes
118+
```
119+
120+
3. The following output example shows the nodes in your cluster. Make sure the status for all nodes shows *Ready*:
121+
122+
```output
123+
NAME STATUS ROLES AGE VERSION
124+
aks-nodepool1-34832848-vmss000000   Ready    agent   80m   v1.25.6
125+
aks-nodepool1-34832848-vmss000001   Ready    agent   80m   v1.25.6
126+
aks-nodepool1-34832848-vmss000002   Ready    agent   80m   v1.25.6
127+
```
128+
129+
Take note of the name of your node pool. In this example, it would be **nodepool1**.
130+
131+
## Label the node pool
132+
133+
Next, you must update your node pool label to associate the node pool with the correct IO engine for Azure Container Storage.
134+
135+
Run the following command to update the label. Remember to replace `<resource-group>` and `<cluster-name>` with your own values, and replace `<nodepool-name>` with the name of your node pool from the previous step.
136+
137+
```azurecli-interactive
138+
az aks nodepool update --resource-group <resource group> --cluster-name <cluster name> --name <nodepool name> --labels acstor.azure.com/io-engine=acstor
139+
```
140+
141+
> [!TIP]
142+
> You can verify that the node pool is correctly labeled by signing into the [Azure portal](https://portal.azure.com?azure-portal=true) and navigating to your AKS cluster. Go to **Settings > Node pools**, select your node pool, and under **Taints and labels** you should see `Labels: acstor.azure.com/io-engine:acstor`.
143+
144+
## Assign Contributor role to AKS managed identity
145+
146+
Azure Container Service is a separate service from AKS, so you'll need to grant permissions to allow Azure Container Storage to provision storage for your cluster. Specifically, you must assign the [Contributor](../../role-based-access-control/built-in-roles.md#contributor) Azure RBAC built-in role to the AKS managed identity. You'll need an [Owner](../../role-based-access-control/built-in-roles.md#owner) role for your Azure subscription in order to do this. If you don't have sufficient permissions, ask your admin to perform these steps.
147+
148+
1. Sign into the [Azure portal](https://portal.azure.com?azure-portal=true), and search for and select **Kubernetes services**.
149+
1. Locate and select your AKS cluster. Select **Settings** > **Properties** from the left navigation.
150+
1. Under **Infrastructure resource group**, you should see a link to the resource group that AKS created when you created the cluster. Select it.
151+
1. Select **Access control (IAM)** from the left pane.
152+
1. Select **Add > Add role assignment**.
153+
1. Under **Assignment type**, select **Privileged administrator roles** and then **Contributor**. If you don't have an Owner role on the subscription, you won't be able to add the Contributor role.
154+
1. Under **Assign access to**, select **Managed identity**.
155+
1. Under **Members**, click **+ Select members**. The **Select managed identities** menu will appear.
156+
1. Under **Managed identity**, select **User-assigned managed identity**.
157+
1. Under **Select**, search for and select the managed identity with your cluster name and `-agentpool` appended.
158+
1. Select **Review + assign**.
159+
160+
## Install Azure Container Storage
161+
162+
The initial install uses Azure Arc CLI commands to download a new extension. Replace `<cluster-name>` and `<resource-group>` with your own values. The `<name>` value can be whatever you want; it's just a label for the extension you're installing.
163+
164+
During installation, you might be asked to install the `k8s-extension`. Select **Y**.
165+
166+
```azurecli-interactive
167+
az k8s-extension create --cluster-type managedClusters --cluster-name <cluster name> --resource-group <resource group name> --name <name of extension> --extension-type microsoft.azurecontainerstorage --scope cluster --release-train prod --release-namespace acstor
168+
```
169+
170+
Installation takes 10-15 minutes to complete. You can check if the installation completed correctly by running the following command and ensuring that `provisioningState` says **Succeeded**:
171+
172+
```azurecli-interactive
173+
az k8s-extension list --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type managedClusters
174+
```
175+
176+
Congratulations, you've successfully installed Azure Container Storage. You now have new storage classes that you can use for your Kubernetes workloads.
177+
178+
## Next steps
179+
180+
Now you can create a storage pool and persistent volume claim, and then deploy a pod and attach a persistent volume. Follow the steps in the appropriate how-to article.
181+
182+
- [Use Azure Container Storage Preview with Azure Elastic SAN Preview](use-container-storage-with-elastic-san.md)
183+
- [Use Azure Container Storage Preview with Azure Disks](use-container-storage-with-managed-disks.md)
184+
- [Use Azure Container Storage with Azure Ephemeral disk (NVMe)](use-container-storage-with-local-disk.md)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Frequently asked questions (FAQ) for Azure Container Storage
3+
description: Get answers to Azure Container Storage frequently asked questions.
4+
author: khdownie
5+
ms.service: storage
6+
ms.date: 05/12/2023
7+
ms.author: kendownie
8+
ms.subservice: container-storage
9+
ms.topic: conceptual
10+
---
11+
12+
# Frequently asked questions (FAQ) about Azure Container Storage
13+
[Azure Container Storage](container-storage-introduction.md) is a cloud-based volume management, deployment, and orchestration service built natively for containers.
14+
15+
## General questions
16+
17+
* <a id="azure-container-storage-vs-csi-drivers"></a>
18+
**What's the difference between Azure Container Storage and Azure CSI drivers?**
19+
Azure Container Storage is built natively for containers and provides a storage solution that's optimized for creating and managing volumes for running production-scale stateful container applications. Other Azure CSI drivers provide a standard storage solution that can be used with different container orchestrators and support the specific type of storage solution per CSI driver definition.
20+
21+
* <a id="azure-container-storage-regions"></a>
22+
**In which Azure regions is Azure Container Storage available?**
23+
Azure Container Storage Preview is only available in East US, West Europe, West US 2, and West US 3. See [Azure products available by region](https://azure.microsoft.com/global-infrastructure/services/?products).
24+
25+
* <a id="azure-container-storage-preview-limitations"></a>
26+
**Which other Azure services does Azure Container Storage support?**
27+
During public preview, Azure Container Storage supports only Azure Kubernetes Service (AKS) with storage pools provided by Azure Disks, Ephemeral Disk, or Azure Elastic SAN Preview.
28+
29+
* <a id="azure-container-storage-delete-aks-resource-group"></a>
30+
**I've created an Elastic SAN storage pool, and I'm trying to delete my resource group where my AKS cluster is located and it's not working. Why?**
31+
Sign into the [Azure portal](https://portal.azure.com?azure-portal=true) and select **Resource groups**. Locate the resource group that AKS created (the resource group name starts with **MC_**). Select the SAN resource object within that resource group. Manually remove all volumes and volume groups. Then retry deleting the resource group that includes your AKS cluster.
32+
33+
* <a id="azure-container-storage-autoupgrade"></a>
34+
**Is there any performance impact when upgrading to a new version of Azure Container Storage?**
35+
If you leave autoupgrade turned on (recommended), you might experience temporary I/O latency during the upgrade process. If you turn off autoupgrade and install the new version manually, there won't be any impact; however, you won't get the benefit of automatic upgrades and instant access to new features.
36+
37+
* <a id="azure-container-storage-uninstall"></a>
38+
**How do I uninstall Azure Container Storage?**
39+
To uninstall Azure Container Storage, you can delete the `k8s-extension` by running the following Azure CLI command. Be sure to replace `<cluster-name>`, `<resource-group>`, and `<name>` with your own values (`<name>` should be the value you specified for the --name parameter when you installed Azure Container Storage).
40+
41+
```azurecli-interactive
42+
az k8s-extension delete --cluster-type managedClusters --cluster-name <cluster-name> --resource-group <resource-group> --name <extension-name>
43+
```
44+
45+
You can also use the [`az group delete`](/cli/azure/group) command to delete the resource group and all resources contained in the resource group:
46+
47+
```azurecli-interactive
48+
az group delete --name <resource-group>
49+
```
50+
51+
## Billing and pricing
52+
53+
* <a id="azure-container-storage-billing"></a>
54+
**How much does Azure Container Storage cost to use?**
55+
See the [Azure Container Storage pricing page](https://aka.ms/AzureContainerStoragePricingPage).
56+
57+
## See also
58+
- [What is Azure Container Storage?](container-storage-introduction.md)

0 commit comments

Comments
 (0)