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
Copy file name to clipboardExpand all lines: articles/storage/container-storage/install-container-storage-aks.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,32 +4,33 @@ description: Learn how to install Azure Container Storage for use with Azure Kub
4
4
author: khdownie
5
5
ms.service: azure-container-storage
6
6
ms.topic: tutorial
7
-
ms.date: 05/24/2024
7
+
ms.date: 05/30/2024
8
8
ms.author: kendownie
9
9
ms.custom: devx-track-azurecli
10
10
---
11
11
12
12
# Tutorial: Install Azure Container Storage Preview for use with Azure Kubernetes Service
13
13
14
-
[Azure Container Storage](container-storage-introduction.md) is a cloud-based volume management, deployment, and orchestration service built natively for containers. In this tutorial, you'll create an [Azure Kubernetes Service (AKS)](../../aks/intro-kubernetes.md) cluster and install Azure Container Storage on the cluster. Alternatively, you can install Azure Container Storage [using a QuickStart](container-storage-aks-quickstart.md) instead of following the manual steps in this tutorial.
15
-
16
-
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
14
+
[Azure Container Storage](container-storage-introduction.md) is a cloud-based volume management, deployment, and orchestration service built natively for containers. In this tutorial, you'll create an [Azure Kubernetes Service (AKS)](../../aks/intro-kubernetes.md) cluster and install Azure Container Storage on the cluster. If you already have an AKS cluster deployed, we recommend installing Azure Container Storage [using this QuickStart](container-storage-aks-quickstart.md) instead of following the manual steps in this tutorial.
17
15
18
16
> [!div class="checklist"]
19
17
> * Create a resource group
20
18
> * Choose a data storage option and VM type
21
19
> * Create an AKS cluster
22
20
> * Connect to the cluster
23
21
> * Label the node pool
24
-
> * Assign Contributor role to AKS managed identity
25
-
> * Install Azure Container Storage extension
22
+
> * Assign Azure Container Storage Operator role to AKS managed identity
* If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
30
28
31
-
> [!NOTE]
32
-
> If you already have an AKS cluster deployed, proceed to [Connect to the cluster](#connect-to-the-cluster).
29
+
* This article requires the latest version (2.35.0 or later) of the Azure CLI. See [How to install the Azure CLI](/cli/azure/install-azure-cli). If you're using the Bash environment in Azure Cloud Shell, the latest version is already installed. If you plan to run the commands locally instead of in Azure Cloud Shell, be sure to run them with administrative privileges. For more information, see [Get started with Azure Cloud Shell](/azure/cloud-shell/get-started).
30
+
31
+
* 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.
32
+
33
+
* Check if your target region is supported in [Azure Container Storage regions](container-storage-introduction.md#regional-availability).
33
34
34
35
## Getting started
35
36
@@ -174,9 +175,9 @@ az aks nodepool update --resource-group <resource-group> --cluster-name <cluster
174
175
175
176
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`.
176
177
177
-
## Assign Contributor role to AKS managed identity
178
+
## Assign Azure Container Storage Operator role to AKS managed identity
178
179
179
-
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 can do this using the Azure portal or Azure CLI. 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.
180
+
You only need to perform this step if you plan to use Azure Elastic SAN as backing storage. In order to use Elastic SAN, you'll need to grant permissions to allow Azure Container Storage to provision storage for your cluster. Specifically, you must assign the [Azure Container Storage Operator](../../role-based-access-control/built-in-roles/containers.md#azure-container-storage-operator)role to the AKS managed identity. You can do this using the Azure portal or Azure CLI. You'll need either an [Azure Container Storage Owner](../../role-based-access-control/built-in-roles/containers.md#azure-container-storage-owner) role or [Azure Container Storage Contributor](../../role-based-access-control/built-in-roles/containers.md#azure-container-storage-contributor) role for your Azure subscription in order to do this. If you don't have sufficient permissions, ask your admin to perform these steps.
180
181
181
182
# [Azure portal](#tab/portal)
182
183
@@ -185,10 +186,7 @@ Azure Container Service is a separate service from AKS, so you'll need to grant
185
186
1. Under **Infrastructure resource group**, you should see a link to the resource group that AKS created when you created the cluster. Select it.
186
187
1. Select **Access control (IAM)** from the left pane.
187
188
1. Select **Add > Add role assignment**.
188
-
1. Under **Assignment type**, select **Privileged administrator roles** and then **Contributor**, then select **Next**. If you don't have an Owner role on the subscription, you won't be able to add the Contributor role.
189
-
190
-
:::image type="content" source="media/install-container-storage-aks/add-role-assignment.png" alt-text="Screenshot showing how to use the Azure portal to add Contributor role to the AKS managed identity." lightbox="media/install-container-storage-aks/add-role-assignment.png":::
191
-
189
+
1. Under the **Job function roles** tab, select or search for **Azure Container Storage Operator**, then select **Next**. If you don't have an **Azure Container Storage Owner** or **Azure Container Storage Contributor** role on the subscription, you won't be able to add the **Azure Container Storage Operator** role.
192
190
1. Under **Assign access to**, select **Managed identity**.
193
191
1. Under **Members**, click **+ Select members**. The **Select managed identities** menu will appear.
194
192
1. Under **Managed identity**, select **User-assigned managed identity**.
@@ -197,11 +195,11 @@ Azure Container Service is a separate service from AKS, so you'll need to grant
197
195
198
196
# [Azure CLI](#tab/cli)
199
197
200
-
Run the following commands to assign Contributor role to AKS managed identity. Remember to replace `<resource-group>`, `<cluster-name>`, and `<azure-subscription-id>` with your own values. You can also narrow the scope to your resource group, for example `/subscriptions/<azure-subscription-id>/resourceGroups/<resource-group>`.
198
+
Run the following commands to assign **Azure Container Storage Operator** role to AKS managed identity. Remember to replace `<resource-group>`, `<cluster-name>`, and `<azure-subscription-id>` with your own values. You can also narrow the scope to your resource group, for example `/subscriptions/<azure-subscription-id>/resourceGroups/<resource-group>`.
201
199
202
200
```azurecli-interactive
203
201
export AKS_MI_OBJECT_ID=$(az aks show --name <cluster-name> --resource-group <resource-group> --query "identityProfile.kubeletidentity.objectId" -o tsv)
204
-
az role assignment create --assignee $AKS_MI_OBJECT_ID --role "Contributor" --scope "/subscriptions/<azure-subscription-id>"
202
+
az role assignment create --assignee $AKS_MI_OBJECT_ID --role "Azure Container Storage Operator" --scope "/subscriptions/<azure-subscription-id>"
- Ensure your subscription has [Azure role-basedaccesscontrol (Azure RBAC) Owner](../../role-based-access-control/built-in-roles/general.md#owner) role. For Azure Container Storage to successfully communicate with Elastic SAN's API, it needs special permissions that the Owner role will grant.
20
+
- Ensure your subscription has either an [Azure Container Storage Owner](../../role-based-access-control/built-in-roles/containers.md#azure-container-storage-owner) role or [Azure Container Storage Contributor](../../role-based-access-control/built-in-roles/containers.md#azure-container-storage-contributor) role. For Azure Container Storage to successfully communicate with Elastic SAN's API, it needs special permissions that either of those two roles will grant.
21
21
22
22
> [!NOTE]
23
23
> To use Azure Container Storage with Azure Elastic SAN, your AKS cluster should have a node pool of at least three [general purpose VMs](../../virtual-machines/sizes-general.md) such as **standard_d4s_v5** for the cluster nodes, each with a minimum of four virtual CPUs (vCPUs).
@@ -78,24 +78,6 @@ Follow these steps to create a storage pool with Azure Elastic SAN.
78
78
79
79
When the storage pool is created, Azure Container Storage will create a storage class on your behalf using the naming convention `acstor-<storage-pool-name>`. It will also create an Azure Elastic SAN resource.
80
80
81
-
## Assign Contributor role to AKS managed identity on Azure Elastic SAN subscription
82
-
83
-
Next, you must assign the [Contributor](../../role-based-access-control/built-in-roles.md#contributor) Azure RBAC built-in role to the AKS managed identity on your Azure Elastic SAN subscription. 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.
84
-
85
-
1. Sign in to the [Azure portal](https://portal.azure.com?azure-portal=true).
86
-
1. Select **Subscriptions**, and locate and select the subscription associated with the Azure Elastic SAN resource that Azure Container Storage created on your behalf. This will likely be the same subscription as the AKS cluster that Azure Container Storage is installed on. You can verify this by locating the Elastic SAN resource in the resource group that AKS created (`MC_YourResourceGroup_YourAKSClusterName_Region`).
87
-
1. Select **Access control (IAM)** from the left pane.
88
-
1. Select **Add > Add role assignment**.
89
-
1. Under **Assignment type**, select **Privileged administrator roles** and then **Contributor**, then select **Next**. If you don't have an Owner role on the subscription, you won't be able to add the Contributor role.
90
-
91
-
:::image type="content" source="media/install-container-storage-aks/add-role-assignment.png" alt-text="Screenshot showing how to use the Azure portal to add Contributor role to the AKS managed identity." lightbox="media/install-container-storage-aks/add-role-assignment.png":::
92
-
93
-
1. Under **Assign access to**, select **Managed identity**.
94
-
1. Under **Members**, click **+ Select members**. The **Select managed identities** menu will appear.
95
-
1. Under **Managed identity**, select **User-assigned managed identity**.
96
-
1. Under **Select**, search for and select the managed identity with your cluster name and `-agentpool` appended.
97
-
1. Click **Select**, then **Review + assign**.
98
-
99
81
## Display the available storage classes
100
82
101
83
When the storage pool is ready to use, you must select a storage class to define how storage is dynamically created when creating persistent volume claims and deploying persistent volumes.
0 commit comments