Skip to content

Commit 4d61d18

Browse files
authored
Merge pull request #234054 from andyzhangx/patch-66
remove outdated snapshot example
2 parents cb673d1 + e83bc87 commit 4d61d18

File tree

4 files changed

+26
-140
lines changed

4 files changed

+26
-140
lines changed

articles/aks/azure-blob-csi.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Use Container Storage Interface (CSI) driver for Azure Blob storage on Azure Kubernetes Service (AKS)
33
description: Learn how to use the Container Storage Interface (CSI) driver for Azure Blob storage in an Azure Kubernetes Service (AKS) cluster.
44
ms.topic: article
5-
ms.date: 03/29/2023
5+
ms.date: 04/13/2023
66

77
---
88

@@ -141,9 +141,8 @@ To have a storage volume persist for your workload, you can use a StatefulSet. T
141141
volumeClaimTemplates:
142142
- metadata:
143143
name: persistent-storage
144-
annotations:
145-
volume.beta.kubernetes.io/storage-class: azureblob-nfs-premium
146144
spec:
145+
storageClassName: azureblob-nfs-premium
147146
accessModes: ["ReadWriteMany"]
148147
resources:
149148
requests:
@@ -191,9 +190,8 @@ To have a storage volume persist for your workload, you can use a StatefulSet. T
191190
volumeClaimTemplates:
192191
- metadata:
193192
name: persistent-storage
194-
annotations:
195-
volume.beta.kubernetes.io/storage-class: azureblob-fuse-premium
196193
spec:
194+
storageClassName: azureblob-fuse-premium
197195
accessModes: ["ReadWriteMany"]
198196
resources:
199197
requests:

articles/aks/azure-csi-disk-storage-provision.md

Lines changed: 3 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure Kubernetes Service
44
description: Learn how to create a static or dynamic persistent volume with Azure Disks for use with multiple concurrent pods in Azure Kubernetes Service (AKS)
55
ms.topic: article
66
ms.custom: devx-track-azurecli
7-
ms.date: 03/23/2023
7+
ms.date: 04/11/2023
88
---
99

1010
# Create and use a volume with Azure Disks in Azure Kubernetes Service (AKS)
@@ -25,7 +25,7 @@ For more information on Kubernetes volumes, see [Storage options for application
2525

2626
* You need an Azure [storage account][azure-storage-account].
2727
* Make sure you have Azure CLI version 2.0.59 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].
28-
* The Azure Disks CSI driver has a limit of 32 volumes per node. The volume count changes based on the size of the node/node pool. Run the [kubectl get][kubectl-get] command to determine the number of volumes that can be allocated per node:
28+
* The Azure Disk CSI driver has a per-node volume limit. The volume count changes based on the size of the node/node pool. Run the [kubectl get][kubectl-get] command to determine the number of volumes that can be allocated per node:
2929

3030
```console
3131
kubectl get CSINode <nodename> -o yaml
@@ -42,7 +42,6 @@ This section provides guidance for cluster administrators who want to provision
4242
|skuName | Azure Disks storage account type (alias: `storageAccountType`)| `Standard_LRS`, `Premium_LRS`, `StandardSSD_LRS`, `PremiumV2_LRS`, `UltraSSD_LRS`, `Premium_ZRS`, `StandardSSD_ZRS` | No | `StandardSSD_LRS`|
4343
|fsType | File System Type | `ext4`, `ext3`, `ext2`, `xfs`, `btrfs` for Linux, `ntfs` for Windows | No | `ext4` for Linux, `ntfs` for Windows|
4444
|cachingMode | [Azure Data Disk Host Cache Setting][disk-host-cache-setting] | `None`, `ReadOnly`, `ReadWrite` | No | `ReadOnly`|
45-
|location | Specify Azure region where Azure Disks will be created | `eastus`, `westus`, etc. | No | If empty, driver will use the same location name as current AKS cluster|
4645
|resourceGroup | Specify the resource group where the Azure Disks will be created | Existing resource group name | No | If empty, driver will use the same resource group name as current AKS cluster|
4746
|DiskIOPSReadWrite | [UltraSSD disk][ultra-ssd-disks] IOPS Capability (minimum: 2 IOPS/GiB ) | 100~160000 | No | `500`|
4847
|DiskMBpsReadWrite | [UltraSSD disk][ultra-ssd-disks] Throughput Capability(minimum: 0.032/GiB) | 1~2000 | No | `100`|
@@ -55,10 +54,8 @@ This section provides guidance for cluster administrators who want to provision
5554
|diskAccessID | Azure Resource ID of the DiskAccess resource to use private endpoints on disks | | No | ``|
5655
|enableBursting | [Enable on-demand bursting][on-demand-bursting] beyond the provisioned performance target of the disk. On-demand bursting should only be applied to Premium disk and when the disk size > 512 GB. Ultra and shared disk isn't supported. Bursting is disabled by default. | `true`, `false` | No | `false`|
5756
|useragent | User agent used for [customer usage attribution][customer-usage-attribution] | | No | Generated Useragent formatted `driverName/driverVersion compiler/version (OS-ARCH)`|
58-
|enableAsyncAttach | Allow multiple disk attach operations (in batch) on one node in parallel.<br> While this parameter can speed up disk attachment, you may encounter Azure API throttling limit when there are large number of volume attachments. | `true`, `false` | No | `false`|
5957
|subscriptionID | Specify Azure subscription ID where the Azure Disks is created. | Azure subscription ID | No | If not empty, `resourceGroup` must be provided.|
6058
|--- | **Following parameters are only for v2** | --- | --- | --- |
61-
| enableAsyncAttach | The v2 driver uses a different strategy to manage Azure API throttling and ignores this parameter. | | No | |
6259
| maxShares | The total number of shared disk mounts allowed for the disk. Setting the value to 2 or more enables attachment replicas. | Supported values depend on the disk size. See [Share an Azure managed disk][share-azure-managed-disk] for supported values. | No | 1 |
6360
| maxMountReplicaCount | The number of replicas attachments to maintain. | This value must be in the range `[0..(maxShares - 1)]` | No | If `accessMode` is `ReadWriteMany`, the default is `0`. Otherwise, the default is `maxShares - 1` |
6461

@@ -71,7 +68,7 @@ Each AKS cluster includes four pre-created storage classes, two of them configur
7168
1. The *default* storage class provisions a standard SSD Azure Disk.
7269
* Standard storage is backed by Standard SSDs and delivers cost-effective storage while still delivering reliable performance.
7370
1. The *managed-csi-premium* storage class provisions a premium Azure Disk.
74-
* Premium disks are backed by SSD-based high-performance, low-latency disks. They're ideal for VMs running production workloads. When you use the Azure Disks CSI driver on AKS, you can also use the `managed-csi` storage class, which is backed by Standard SSD locally redundant storage (LRS).
71+
* Premium disks are backed by SSD-based high-performance, low-latency disks. They're ideal for VMs running production workloads. When you use the Azure Disk CSI driver on AKS, you can also use the `managed-csi` storage class, which is backed by Standard SSD locally redundant storage (LRS).
7572

7673
It's not supported to reduce the size of a PVC (to prevent data loss). You can edit an existing storage class using the `kubectl edit sc` command, or you can create your own custom storage class. For example, if you want to use a disk of size 4 TiB, you must create a storage class that defines `cachingmode: None` because [disk caching isn't supported for disks 4 TiB and larger][disk-host-cache-setting]. For more information about storage classes and creating your own storage class, see [Storage options for applications in AKS][storage-class-concepts].
7774

@@ -203,117 +200,6 @@ Once the persistent volume claim has been created and the disk successfully prov
203200

204201
To use Azure ultra disk, see [Use ultra disks on Azure Kubernetes Service (AKS)][use-ultra-disks].
205202

206-
### Back up a persistent volume
207-
208-
To back up the data in your persistent volume, take a snapshot of the managed disk for the volume. You can then use this snapshot to create a restored disk and attach to pods as a means of restoring the data.
209-
210-
1. Get the volume name with the [kubectl get][kubectl-get] command, such as for the PVC named *azure-managed-disk*:
211-
212-
```bash
213-
kubectl get pvc azure-managed-disk
214-
```
215-
216-
The output of the command resembles the following example:
217-
218-
```console
219-
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
220-
azure-managed-disk Bound pvc-faf0f176-8b8d-11e8-923b-deb28c58d242 5Gi RWO managed-premium 3m
221-
```
222-
223-
2. This volume name forms the underlying Azure disk name. Query for the disk ID with [az disk list][az-disk-list] and provide your PVC volume name, as shown in the following example:
224-
225-
```azurecli
226-
az disk list --query '[].id | [?contains(@,`pvc-faf0f176-8b8d-11e8-923b-deb28c58d242`)]' -o tsv
227-
228-
/subscriptions/<guid>/resourceGroups/MC_MYRESOURCEGROUP_MYAKSCLUSTER_EASTUS/providers/MicrosoftCompute/disks/kubernetes-dynamic-pvc-faf0f176-8b8d-11e8-923b-deb28c58d242
229-
```
230-
231-
3. Use the disk ID to create a snapshot disk with [az snapshot create][az-snapshot-create]. The following example creates a snapshot named *pvcSnapshot* in the same resource group as the AKS cluster *MC_myResourceGroup_myAKSCluster_eastus*. You may encounter permission issues if you create snapshots and restore disks in resource groups that the AKS cluster doesn't have access to. Depending on the amount of data on your disk, it may take a few minutes to create the snapshot.
232-
233-
```azurecli
234-
az snapshot create \
235-
--resource-group MC_myResourceGroup_myAKSCluster_eastus \
236-
--name pvcSnapshot \
237-
--source /subscriptions/<guid>/resourceGroups/MC_myResourceGroup_myAKSCluster_eastus/providers/MicrosoftCompute/disks/kubernetes-dynamic-pvc-faf0f176-8b8d-11e8-923b-deb28c58d242
238-
```
239-
240-
### Restore and use a snapshot
241-
242-
1. To restore the disk and use it with a Kubernetes pod, use the snapshot as a source when you create a disk with [az disk create][az-disk-create]. This operation preserves the original resource if you then need to access the original data snapshot. The following example creates a disk named *pvcRestored* from the snapshot named *pvcSnapshot*:
243-
244-
```azurecli
245-
az disk create --resource-group MC_myResourceGroup_myAKSCluster_eastus --name pvcRestored --source pvcSnapshot
246-
```
247-
248-
2. To use the restored disk with a pod, specify the ID of the disk in the manifest. Get the disk ID with the [az disk show][az-disk-show] command. The following example gets the disk ID for *pvcRestored* created in the previous step:
249-
250-
```azurecli
251-
az disk show --resource-group MC_myResourceGroup_myAKSCluster_eastus --name pvcRestored --query id -o tsv
252-
```
253-
254-
3. Create a pod manifest named `azure-restored.yaml` and specify the disk URI obtained in the previous step. The following example creates a basic NGINX web server, with the restored disk mounted as a volume at */mnt/azure*:
255-
256-
```yaml
257-
kind: Pod
258-
apiVersion: v1
259-
metadata:
260-
name: mypodrestored
261-
spec:
262-
containers:
263-
- name: mypodrestored
264-
image: mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine
265-
resources:
266-
requests:
267-
cpu: 100m
268-
memory: 128Mi
269-
limits:
270-
cpu: 250m
271-
memory: 256Mi
272-
volumeMounts:
273-
- mountPath: "/mnt/azure"
274-
name: volume
275-
volumes:
276-
- name: volume
277-
azureDisk:
278-
kind: Managed
279-
diskName: pvcRestored
280-
diskURI: /subscriptions/<guid>/resourceGroups/MC_myResourceGroupAKS_myAKSCluster_eastus/providers/Microsoft.Compute/disks/pvcRestored
281-
```
282-
283-
4. Create the pod with the [kubectl apply][kubectl-apply] command, as shown in the following example:
284-
285-
```bash
286-
kubectl apply -f azure-restored.yaml
287-
```
288-
289-
The output of the command resembles the following example:
290-
291-
```console
292-
pod/mypodrestored created
293-
```
294-
295-
5. You can use `kubectl describe pod mypodrestored` to view details of the pod, such as the following condensed example that shows the volume information:
296-
297-
```bash
298-
kubectl describe pod mypodrestored
299-
```
300-
301-
The output of the command resembles the following example:
302-
303-
```console
304-
[...]
305-
Volumes:
306-
volume:
307-
Type: AzureDisk (an Azure Data Disk mount on the host and bind mount to the pod)
308-
DiskName: pvcRestored
309-
DiskURI: /subscriptions/19da35d3-9a1a-4f3b-9b9c-3c56ef409565/resourceGroups/MC_myResourceGroupAKS_myAKSCluster_eastus/providers/Microsoft.Compute/disks/pvcRestored
310-
Kind: Managed
311-
FSType: ext4
312-
CachingMode: ReadWrite
313-
ReadOnly: false
314-
[...]
315-
```
316-
317203
### Using Azure tags
318204

319205
For more information on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].

0 commit comments

Comments
 (0)