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
# Customer intent: "As a cloud administrator, I want to install Azure Container Storage on an AKS cluster so that I can efficiently manage storage for containerized applications."
11
12
---
12
13
@@ -19,6 +20,8 @@ If you prefer the open-source version of Azure Container Storage, visit the [loc
19
20
> [!IMPORTANT]
20
21
> This article applies to [Azure Container Storage (version 2.x.x)](container-storage-introduction.md). For earlier versions, see [Azure Container Storage (version 1.x.x) documentation](container-storage-introduction-version-1.md). If you already have Azure Container Storage (version 1.x.x) installed on your AKS cluster, remove it by following [these steps](remove-container-storage-version-1.md).
21
22
23
+
::: zone pivot="azurecli"
24
+
22
25
> [!div class="checklist"]
23
26
> * Prepare your Azure CLI environment
24
27
> * Create or select a resource group for your cluster
@@ -27,15 +30,18 @@ If you prefer the open-source version of Azure Container Storage, visit the [loc
27
30
28
31
## Prerequisites
29
32
30
-
-If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn) before you begin.
33
+
-Create an Azure subscription if you don’t already have one by signing up for a [free account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
31
34
32
-
-This article requires the latest version (2.77.0 or later) of the Azure CLI. See [How to install the Azure CLI](/cli/azure/install-azure-cli). Don't use Azure Cloud Shell, because `az upgrade` isn't available in Cloud Shell. Be sure to run the commands in this article with administrative privileges. Some Azure CLI extensions, such as `aks-preview`, can conflict with required command flags. Disable them if you encounter issues.
35
+
-Confirm that your target region is supported by reviewing the [Azure Container Storage regional availability](container-storage-introduction.md#regional-availability).
33
36
34
-
- You need the Kubernetes command-line client, `kubectl`. You can install it locally by running the `az aks install-cli` command.
37
+
- Plan your node pool configuration:
38
+
- Use Linux as the OS type (Windows is not supported).
39
+
- Select a VM SKU that supports local NVMe data disks, such as [storage-optimized](/azure/virtual-machines/sizes/overview#storage-optimized) or [GPU-accelerated](/azure/virtual-machines/sizes/overview#gpu-accelerated) VMs.
40
+
- For existing clusters, ensure node pools already use a supported VM SKU before enabling Azure Container Storage.
35
41
36
-
-Check if your target region is supported in [Azure Container Storage regions](container-storage-introduction.md#regional-availability).
42
+
-Install the latest version of the [Azure CLI](/cli/azure/install-azure-cli) (2.77.0 or later), then sign in with `az login`. Avoid using Azure Cloud Shell (since `az upgrade` isn’t available), and disable conflicting extensions such as `aks-preview` if issues occur.
37
43
38
-
-Sign in to Azure by using the [az login](/cli/azure/reference-index#az-login) command.
44
+
-Install the Kubernetes command-line client, `kubectl`. You can install it locally by running `az aks install-cli`.
39
45
40
46
## Install the required extension
41
47
@@ -81,19 +87,14 @@ If the resource group is created successfully, you see output similar to this ex
81
87
}
82
88
```
83
89
84
-
## Ensure the VM type for your cluster meets the installation criteria
85
-
86
-
Follow these guidelines when choosing a virtual machine type for the cluster nodes.
87
-
88
-
- Choose a virtual machine SKU that supports local NVMe data disks, for example, [storage optimized VMs](/azure/virtual-machines/sizes/overview#storage-optimized) or [GPU accelerated VMs](/azure/virtual-machines/sizes/overview#gpu-accelerated).
89
-
- Choose the OS type for the VMs in the node pools as Linux OS. Windows OS isn't currently supported.
90
-
- For existing clusters, make sure node pools already use a supported VM SKU before enabling Azure Container Storage.
91
-
92
-
## Install Azure Container Storage on your AKS cluster
90
+
## Install Azure Container Storage on an AKS cluster
93
91
94
92
Choose the scenario that matches your environment.
95
93
96
-
### Option 1: Create a new AKS cluster with Azure Container Storage enabled
94
+
> [!IMPORTANT]
95
+
> Azure Container Storage installs the latest available version and updates itself automatically. Manual version selection is not supported.
96
+
97
+
### Option 1: Creating a new AKS cluster with Azure Container Storage enabled
97
98
98
99
Run the following command to create a new AKS cluster and install Azure Container Storage. Replace `<cluster-name>` and `<resource-group>` with your own values, and specify which VM type you want to use.
99
100
@@ -103,7 +104,7 @@ az aks create -n <cluster-name> -g <resource-group> --node-vm-size Standard_L8s_
103
104
104
105
The deployment takes 5-10 minutes. When it completes, you have an AKS cluster with Azure Container Storage installed and the components for local NVMe storage type deployed.
105
106
106
-
### Option 2: Enable Azure Container Storage on an existing AKS cluster
107
+
### Option 2: Enabling Azure Container Storage on an existing AKS cluster
107
108
108
109
Run the following command to enable Azure Container Storage on an existing AKS cluster. Replace `<cluster-name>` and `<resource-group>` with your own values.
109
110
@@ -113,6 +114,165 @@ az aks update -n <cluster-name> -g <resource-group> --enable-azure-container-sto
113
114
114
115
The deployment takes 5-10 minutes. When it completes, the targeted AKS cluster has Azure Container Storage installed and the components for local NVMe storage type deployed.
115
116
117
+
::: zone-end
118
+
119
+
::: zone pivot="terraform"
120
+
121
+
> [!div class="checklist"]
122
+
> * Prepare Terraform and authenticate to Azure
123
+
> * Define your resource group and AKS cluster configuration
124
+
> * Confirm your node pool virtual machine types meet the installation criteria
125
+
> * Apply Terraform to deploy Azure Container Storage or enable it on an existing cluster
126
+
127
+
## Prerequisites
128
+
129
+
- Create an Azure subscription if you don’t already have one by signing up for a [free account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
130
+
131
+
- Verify that your target region is supported by checking the [Azure Container Storage regional availability](container-storage-introduction.md#regional-availability).
132
+
133
+
- Plan your node pool configuration:
134
+
- Use Linux as the OS type (Windows is not supported).
135
+
- Select a VM SKU that supports local NVMe data disks, such as [storage-optimized](/azure/virtual-machines/sizes/overview#storage-optimized) or [GPU-accelerated](/azure/virtual-machines/sizes/overview#gpu-accelerated) VMs.
136
+
- For existing clusters, ensure node pools already use a supported VM SKU before enabling Azure Container Storage.
137
+
138
+
- Install the [Azure CLI](/cli/azure/install-azure-cli) version 2.77.0 or later, then sign in with `az login`.
139
+
140
+
- Install [Terraform](https://developer.hashicorp.com/terraform/install) version 1.5 or later and confirm the installation with `terraform version`. Terraform can reuse your Azure CLI authentication.
141
+
142
+
- Install `kubectl` so you can validate the cluster after deployment. If needed, run `az aks install-cli` to install it locally.
143
+
144
+
## Set subscription context
145
+
146
+
Terraform can determine a target Azure subscription via various means:
147
+
148
+
-`subscription_id` in the provider block
149
+
-`ARM_SUBSCRIPTION_ID` environment variable
150
+
- Azure CLI default subscription
151
+
- Managed identity (when running in Azure)
152
+
153
+
For local use, set the Azure CLI context:
154
+
155
+
```azurecli
156
+
az account set --subscription <subscription-id>
157
+
```
158
+
159
+
## Install Azure Container Storage on an AKS cluster
160
+
161
+
Choose the scenario that matches your environment.
162
+
163
+
> [!IMPORTANT]
164
+
> Azure Container Storage installs the latest available version and updates itself automatically. Manual version selection is not supported.
165
+
166
+
### Option 1: Creating a new AKS cluster with Azure Container Storage enabled
167
+
168
+
1. In an empty working directory, create a `main.tf` file with the following minimal configuration of an AKS cluster. Update the resource names, locations, and VM sizes to meet your requirements.
2. Initialize the working directory to download the AzureRM provider.
219
+
220
+
```bash
221
+
terraform init
222
+
```
223
+
224
+
3. Review the planned changes.
225
+
226
+
```bash
227
+
terraform plan
228
+
```
229
+
230
+
4. Apply the configuration to create the resource group, AKS cluster, and Azure Container Storage extension. Deployment typically takes 5-10 minutes.
231
+
232
+
```bash
233
+
terraform apply
234
+
```
235
+
236
+
### Option 2: Enabling Azure Container Storage on an existing AKS cluster
237
+
238
+
If your AKS cluster already exists and you're managing it outside of Terraform, you can still enable Azure Container Storage by authoring only the extension resource. Use a data source to look up the cluster ID.
- [Use Azure Container Storage with local NVMe](use-container-storage-with-local-disk.md)
144
304
- [Overview of deploying a highly available PostgreSQL database on Azure Kubernetes Service (AKS)](/azure/aks/postgresql-ha-overview#storage-considerations)
Copy file name to clipboardExpand all lines: articles/storage/container-storage/remove-container-storage.md
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Remove Azure Container Storage
3
-
description: Remove Azure Container Storage by deleting the extension instance for Azure Kubernetes Service (AKS). Optionally delete the AKS cluster or entire resource group to clean up resources.
3
+
description: Remove Azure Container Storage by deleting the extension instance for Azure Kubernetes Service (AKS). To clean up resources, optionally delete the AKS cluster or entire resource group.
4
4
author: khdownie
5
5
ms.service: azure-container-storage
6
6
ms.date: 09/10/2025
@@ -11,7 +11,7 @@ ms.topic: how-to
11
11
12
12
# Remove Azure Container Storage
13
13
14
-
This article shows you how to remove Azure Container Storage by deleting the extension instance for Azure Kubernetes Service (AKS). Optionally, you can also delete the AKS cluster or entire resource group to clean up resources.
14
+
This article shows you how to remove Azure Container Storage by deleting the extension instance for Azure Kubernetes Service (AKS). To clean up resources, you can also delete the AKS cluster or entire resource group.
15
15
16
16
> [!IMPORTANT]
17
17
> This article applies to [Azure Container Storage (version 2.x.x)](container-storage-introduction.md). If you have Azure Container Storage (version 1.x.x) installed on your AKS cluster, remove it by following [these steps](remove-container-storage-version-1.md).
@@ -28,6 +28,23 @@ Follow these steps to remove Azure Container Storage from your AKS cluster.
28
28
az aks update -n <cluster-name> -g <resource-group> --disable-azure-container-storage
29
29
```
30
30
31
+
### Remove the extension with Terraform
32
+
33
+
If you provisioned Azure Container Storage with Terraform, remove the corresponding extension resource from your configuration and apply the change so the result matches the CLI workflow.
34
+
35
+
1. Delete the `azurerm_kubernetes_cluster_extension` block (or set `count = 0`) in your Terraform configuration and save the file.
36
+
1. Review the plan to confirm Terraform destroys only the extension resource.
37
+
38
+
```bash
39
+
terraform plan
40
+
```
41
+
42
+
1. Apply the plan to delete the extension. Terraform displays the same outcome as the CLI command: the extension resource is removed and AKS no longer reports Azure Container Storage as enabled.
43
+
44
+
```bash
45
+
terraform apply
46
+
```
47
+
31
48
## Delete AKS cluster
32
49
33
50
To delete an AKS cluster and all persistent volumes, run the following Azure CLI command. Replace `<resource-group>` and `<cluster-name>` with your own values.
@@ -36,6 +53,14 @@ To delete an AKS cluster and all persistent volumes, run the following Azure CLI
36
53
az aks delete --resource-group <resource-group> --name <cluster-name>
37
54
```
38
55
56
+
If the AKS cluster was created with Terraform, you can also remove it by running the following command.
57
+
58
+
```bash
59
+
terraform destroy
60
+
```
61
+
62
+
This command deletes all resources that Terraform manages in the current working directory. This includes the cluster, the resource group, and the Azure Container Storage extension. Run this command only when you intend to remove the entire deployment.
63
+
39
64
## Delete resource group
40
65
41
66
You can also use the [`az group delete`](/cli/azure/group) command to delete the resource group and all resources it contains. Replace `<resource-group>` with your resource group name.
@@ -46,4 +71,4 @@ az group delete --name <resource-group>
46
71
47
72
## See also
48
73
49
-
-[What is Azure Container Storage?](container-storage-introduction.md)
74
+
- [What is Azure Container Storage?](container-storage-introduction.md)
0 commit comments