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/aks/azure-netapp-files-dual-protocol.md
+55-64Lines changed: 55 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,23 @@ title: Provision Azure NetApp Files dual-protocol volumes for Azure Kubernetes S
3
3
description: Describes how to statically provision Azure NetApp Files dual-protocol volumes for Azure Kubernetes Service.
4
4
ms.topic: article
5
5
ms.custom:
6
-
ms.date: 05/08/2023
6
+
ms.date: 02/26/2024
7
7
---
8
8
9
9
# Provision Azure NetApp Files dual-protocol volumes for Azure Kubernetes Service
10
10
11
-
After you [configure Azure NetApp Files for Azure Kubernetes Service](azure-netapp-files.md), you can provision Azure NetApp Files volumes for Azure Kubernetes Service.
11
+
After you [configure Azure NetApp Files for Azure Kubernetes Service][azure-netapp-files], you can provision Azure NetApp Files volumes for Azure Kubernetes Service.
12
12
13
-
Azure NetApp Files supports volumes using [NFS](azure-netapp-files-nfs.md) (NFSv3 or NFSv4.1), [SMB](azure-netapp-files-smb.md), and dual-protocol (NFSv3 and SMB, or NFSv4.1 and SMB).
14
-
* This article describes details for statically provisioning volumes for dual-protocol access.
15
-
* For information about provisioning SMB volumes statically or dynamically, see [Provision Azure NetApp Files SMB volumes for Azure Kubernetes Service](azure-netapp-files-smb.md).
16
-
* For information about provisioning NFS volumes statically or dynamically, see [Provision Azure NetApp Files NFS volumes for Azure Kubernetes Service](azure-netapp-files-nfs.md).
13
+
Azure NetApp Files supports volumes using [NFS][azure-netapp-nfs] (NFSv3 or NFSv4.1), [SMB][azure-netapp-smb], and dual-protocol (NFSv3 and SMB, or NFSv4.1 and SMB).
14
+
15
+
This article shows how to statically provisioning volumes for dual-protocol access.
16
+
17
+
* For information about provisioning SMB volumes statically or dynamically, see [Provision Azure NetApp Files SMB volumes for Azure Kubernetes Service][azure-netapp-smb].
18
+
* For information about provisioning NFS volumes statically or dynamically, see [Provision Azure NetApp Files NFS volumes for Azure Kubernetes Service][azure-netapp-nfs].
17
19
18
20
## Before you begin
19
21
20
-
* You must have already created a dual-protocol volume. See [create a dual-protocol volume for Azure NetApp Files](../azure-netapp-files/create-volumes-dual-protocol.md).
22
+
* You must have already created a dual-protocol volume. See [create a dual-protocol volume for Azure NetApp Files][azure-netapp-files-volume-dual-protocol].
21
23
22
24
## Provision a dual-protocol volume in Azure Kubernetes Service
23
25
@@ -34,9 +36,9 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
34
36
ANF_ACCOUNT_NAME="myaccountname"
35
37
POOL_NAME="mypool1"
36
38
VOLUME_NAME="myvolname"
37
-
```
38
-
39
-
2. List the details of your volume using [`az netappfiles volume show`](/cli/azure/netappfiles/volume#az-netappfiles-volume-show) command.
39
+
```
40
+
41
+
2. List the details of your volume using the [`az netappfiles volume show`][az-netappfiles-volume-show] command.
40
42
41
43
```azurecli-interactive
42
44
az netappfiles volume show \
@@ -46,7 +48,7 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
46
48
--volume-name $VOLUME_NAME -o JSON
47
49
```
48
50
49
-
The following output is an example of the above command executed with real values.
51
+
The following output is an example of the above command executed with real values.
50
52
51
53
```output
52
54
{
@@ -83,13 +85,13 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
83
85
path: /myfilepath2
84
86
```
85
87
86
-
4. Create the persistent volume using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
88
+
4. Create the persistent volume using the [`kubectl apply`][kubectl-apply] command:
87
89
88
90
```bash
89
91
kubectl apply -f pv-nfs.yaml
90
92
```
91
93
92
-
5. Verify the status of the persistent volume is *Available* by using the [`kubectl describe`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe) command:
94
+
5. Verify the status of the persistent volume is *Available* by using the [`kubectl describe`][kubectl-describe] command:
93
95
94
96
```bash
95
97
kubectl describe pv pv-nfs
@@ -113,13 +115,13 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
113
115
storage: 100Gi
114
116
```
115
117
116
-
2. Create the persistent volume claim using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
118
+
2. Create the persistent volume claim using the [`kubectl apply`][kubectl-apply] command:
117
119
118
120
```bash
119
121
kubectl apply -f pvc-nfs.yaml
120
122
```
121
123
122
-
3. Verify the *Status* of the persistent volume claim is *Bound* by using the [`kubectl describe`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe) command:
124
+
3. Verify the *Status* of the persistent volume claim is *Bound* by using the [`kubectl describe`][kubectl-describe] command:
123
125
124
126
```bash
125
127
kubectl describe pvc pvc-nfs
@@ -151,19 +153,19 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
151
153
claimName: pvc-nfs
152
154
```
153
155
154
-
2. Create the pod using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
156
+
2. Create the pod using the [`kubectl apply`][kubectl-apply][kubectl-apply] command:
155
157
156
158
```bash
157
159
kubectl apply -f nginx-nfs.yaml
158
160
```
159
161
160
-
3. Verify the pod is *Running* by using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
162
+
3. Verify the pod is *Running* by using the [`kubectl apply`][kubectl-apply] command:
161
163
162
164
```bash
163
165
kubectl describe pod nginx-nfs
164
166
```
165
167
166
-
4. Verify your volume has been mounted on the pod by using [`kubectl exec`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec) to connect to the pod, and then use `df -h` to check if the volume is mounted.
168
+
4. Verify your volume has been mounted on the pod by using [`kubectl exec`][kubectl-exec] to connect to the pod, and then use `df -h` to check if the volume is mounted.
167
169
168
170
```bash
169
171
kubectl exec -it nginx-nfs -- sh
@@ -181,38 +183,43 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
181
183
182
184
### Create a secret with the domain credentials
183
185
184
-
1. Create a secret on your AKS cluster to access the AD server using the [`kubectl create secret`](https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kubectl/) command. This secret will be used by the Kubernetes persistent volume to access the Azure NetApp Files SMB volume. Use the following command to create the secret, replacing `USERNAME` with your username, `PASSWORD` with your password, and `DOMAIN_NAME` with your domain name for your Active Directory.
186
+
1. Create a secret on your AKS cluster to access the AD server using the [`kubectl create secret`][kubectl-create-secret] command. This secret will be used by the Kubernetes persistent volume to access the Azure NetApp Files SMB volume. Use the following command to create the secret, replacing `USERNAME` with your username, `PASSWORD` with your password, and `DOMAIN_NAME` with your Active Directory domain name.
For other methods of installing the SMB CSI Driver, see [Install SMB CSI driver master version on a Kubernetes cluster](https://github.com/kubernetes-csi/csi-driver-smb/blob/master/docs/install-csi-driver-master.md).
214
+
For other methods of installing the SMB CSI Driver, see [Install SMB CSI driver master version on a Kubernetes cluster][install-smb-csi-driver].
210
215
211
-
2.Verify that the `csi-smb` controller pod is running and each worker node has a pod running using the [`kubectl get pods`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get) command:
216
+
2.Verify the `csi-smb` controller pod is running and each worker node has a pod running using the [`kubectl get pods`][kubectl-get-pods] command:
@@ -227,9 +234,9 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
227
234
ANF_ACCOUNT_NAME="myaccountname"
228
235
POOL_NAME="mypool1"
229
236
VOLUME_NAME="myvolname"
230
-
```
231
-
232
-
2. List the details of your volume using [`az netappfiles volume show`](/cli/azure/netappfiles/volume#az-netappfiles-volume-show).
237
+
```
238
+
239
+
2. List the details of your volume using [`az netappfiles volume show`][az-netappfiles-volume-show] command.
233
240
234
241
```azurecli-interactive
235
242
az netappfiles volume show \
@@ -239,7 +246,7 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
239
246
--volume-name "$VOLUME_NAME -o JSON
240
247
```
241
248
242
-
The following output is an example of the above command executed with real values.
249
+
The following output is an example of the above command executed with real values.
243
250
244
251
```output
245
252
{
@@ -287,21 +294,21 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
287
294
namespace: default
288
295
```
289
296
290
-
4. Create the persistent volume using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
297
+
4. Create the persistent volume using the [`kubectl apply`][kubectl-apply] command:
291
298
292
299
```bash
293
300
kubectl apply -f pv-smb.yaml
294
301
```
295
302
296
-
5. Verify the status of the persistent volume is *Available* using the [`kubectl describe`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe) command:
303
+
5. Verify the status of the persistent volume is *Available* using the [`kubectl describe`][kubectl-describe] command:
297
304
298
305
```bash
299
306
kubectl describe pv anf-pv-smb
300
307
```
301
308
302
309
### Create a persistent volume claim for SMB
303
310
304
-
1. Create a file name `pvc-smb.yaml` and copy in the following YAML.
311
+
1. Create a file name `pvc-smb.yaml` and copy in the following YAML.
305
312
306
313
```yaml
307
314
apiVersion: v1
@@ -318,19 +325,19 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
318
325
storage: 100Gi
319
326
```
320
327
321
-
2.Create the persistent volume claim using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
328
+
2.Create the persistent volume claim using the [`kubectl apply`][kubectl-apply] command:
322
329
323
330
```bash
324
331
kubectl apply -f pvc-smb.yaml
325
332
```
326
333
327
-
Verify the status of the persistent volume claim is *Bound* by using the [`kubectl describe`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe) command:
334
+
Verify the status of the persistent volume claim is *Bound* by using the [`kubectl describe`][kubectl-describe] command:
328
335
329
336
```bash
330
337
kubectl describe pvc anf-pvc-smb
331
338
```
332
339
333
-
### Mount within a pod using SMB
340
+
### Mount within a pod using SMB
334
341
335
342
1. Create a file named `iis-smb.yaml` and copy in the following YAML. This file will be used to create an Internet Information Services pod to mount the volume to path `/inetpub/wwwroot`.
336
343
@@ -363,19 +370,19 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
363
370
readOnly: false
364
371
```
365
372
366
-
2. Create the pod using the [kubectl apply](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
373
+
2. Create the pod using the [kubectl apply][kubectl-apply] command:
367
374
368
375
```bash
369
376
kubectl apply -f iis-smb.yaml
370
377
```
371
378
372
-
3. Verify the pod is *Running* and `/inetpub/wwwroot` is mounted from SMB by using the [`kubectl describe`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe) command:
379
+
3. Verify the pod is *Running* and `/inetpub/wwwroot` is mounted from SMB by using the [`kubectl describe`][kubectl-describe] command:
373
380
374
381
```bash
375
382
kubectl describe pod iis-pod
376
383
```
377
384
378
-
The output of the command resembles the following example:
385
+
The output of the command resembles the following example:
379
386
380
387
```output
381
388
Name: iis-pod
@@ -413,12 +420,13 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
413
420
...
414
421
```
415
422
416
-
4. Verify your volume has been mounted on the pod by using the [kubectl exec](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec) command to connect to the pod, and then use `dir` command in the correct directory to check if the volume is mounted and the size matches the size of the volume you provisioned.
423
+
4. Verify your volume has been mounted on the pod by using the [kubectl exec][kubectl-exec] command to connect to the pod. Then use the `dir` command in the correct directory to check if the volume is mounted and the size matches the size of the volume you provisioned.
417
424
418
425
```bash
419
426
kubectl exec -it iis-pod –- cmd.exe
420
427
```
421
-
The output of the command resembles the following example:
428
+
429
+
The output of the command resembles the following example:
422
430
423
431
```output
424
432
Microsoft Windows [Version 10.0.20348.1668]
@@ -449,37 +457,20 @@ Astra Trident supports many features with Azure NetApp Files. For more informati
0 commit comments