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
+52-64Lines changed: 52 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,20 @@ 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 you how to statically provisioning volumes for dual-protocol access using NFS or SMB.
17
16
18
17
## Before you begin
19
18
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).
19
+
*Make sure you have already created a dual-protocol volume. See [create a dual-protocol volume for Azure NetApp Files][azure-netapp-files-volume-dual-protocol].
21
20
22
21
## Provision a dual-protocol volume in Azure Kubernetes Service
23
22
@@ -34,9 +33,9 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
34
33
ANF_ACCOUNT_NAME="myaccountname"
35
34
POOL_NAME="mypool1"
36
35
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.
36
+
```
37
+
38
+
2. List the details of your volume using the [`az netappfiles volume show`][az-netappfiles-volume-show] command.
40
39
41
40
```azurecli-interactive
42
41
az netappfiles volume show \
@@ -46,7 +45,7 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
46
45
--volume-name $VOLUME_NAME -o JSON
47
46
```
48
47
49
-
The following output is an example of the above command executed with real values.
48
+
The following output is an example of the above command executed with real values.
50
49
51
50
```output
52
51
{
@@ -83,13 +82,13 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
83
82
path: /myfilepath2
84
83
```
85
84
86
-
4. Create the persistent volume using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
85
+
4. Create the persistent volume using the [`kubectl apply`][kubectl-apply] command:
87
86
88
87
```bash
89
88
kubectl apply -f pv-nfs.yaml
90
89
```
91
90
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:
91
+
5. Verify the status of the persistent volume is *Available* by using the [`kubectl describe`][kubectl-describe] command:
93
92
94
93
```bash
95
94
kubectl describe pv pv-nfs
@@ -113,13 +112,13 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
113
112
storage: 100Gi
114
113
```
115
114
116
-
2. Create the persistent volume claim using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
115
+
2. Create the persistent volume claim using the [`kubectl apply`][kubectl-apply] command:
117
116
118
117
```bash
119
118
kubectl apply -f pvc-nfs.yaml
120
119
```
121
120
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:
121
+
3. Verify the *Status* of the persistent volume claim is *Bound* by using the [`kubectl describe`][kubectl-describe] command:
123
122
124
123
```bash
125
124
kubectl describe pvc pvc-nfs
@@ -151,19 +150,19 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
151
150
claimName: pvc-nfs
152
151
```
153
152
154
-
2. Create the pod using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
153
+
2. Create the pod using the [`kubectl apply`][kubectl-apply][kubectl-apply] command:
155
154
156
155
```bash
157
156
kubectl apply -f nginx-nfs.yaml
158
157
```
159
158
160
-
3. Verify the pod is *Running* by using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
159
+
3. Verify the pod is *Running* by using the [`kubectl apply`][kubectl-apply] command:
161
160
162
161
```bash
163
162
kubectl describe pod nginx-nfs
164
163
```
165
164
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.
165
+
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
166
168
167
```bash
169
168
kubectl exec -it nginx-nfs -- sh
@@ -181,38 +180,43 @@ This section describes how to expose an Azure NetApp Files dual-protocol volume
181
180
182
181
### Create a secret with the domain credentials
183
182
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.
183
+
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).
211
+
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
212
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:
213
+
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 +231,9 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
227
231
ANF_ACCOUNT_NAME="myaccountname"
228
232
POOL_NAME="mypool1"
229
233
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).
234
+
```
235
+
236
+
2. List the details of your volume using [`az netappfiles volume show`][az-netappfiles-volume-show] command.
233
237
234
238
```azurecli-interactive
235
239
az netappfiles volume show \
@@ -239,7 +243,7 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
239
243
--volume-name "$VOLUME_NAME -o JSON
240
244
```
241
245
242
-
The following output is an example of the above command executed with real values.
246
+
The following output is an example of the above command executed with real values.
243
247
244
248
```output
245
249
{
@@ -287,21 +291,21 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
287
291
namespace: default
288
292
```
289
293
290
-
4. Create the persistent volume using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
294
+
4. Create the persistent volume using the [`kubectl apply`][kubectl-apply] command:
291
295
292
296
```bash
293
297
kubectl apply -f pv-smb.yaml
294
298
```
295
299
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:
300
+
5. Verify the status of the persistent volume is *Available* using the [`kubectl describe`][kubectl-describe] command:
297
301
298
302
```bash
299
303
kubectl describe pv anf-pv-smb
300
304
```
301
305
302
306
### Create a persistent volume claim for SMB
303
307
304
-
1. Create a file name `pvc-smb.yaml` and copy in the following YAML.
308
+
1. Create a file name `pvc-smb.yaml` and copy in the following YAML.
305
309
306
310
```yaml
307
311
apiVersion: v1
@@ -318,19 +322,19 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
318
322
storage: 100Gi
319
323
```
320
324
321
-
2.Create the persistent volume claim using the [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
325
+
2.Create the persistent volume claim using the [`kubectl apply`][kubectl-apply] command:
322
326
323
327
```bash
324
328
kubectl apply -f pvc-smb.yaml
325
329
```
326
330
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:
331
+
Verify the status of the persistent volume claim is *Bound* by using the [`kubectl describe`][kubectl-describe] command:
328
332
329
333
```bash
330
334
kubectl describe pvc anf-pvc-smb
331
335
```
332
336
333
-
### Mount within a pod using SMB
337
+
### Mount within a pod using SMB
334
338
335
339
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
340
@@ -363,19 +367,19 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
363
367
readOnly: false
364
368
```
365
369
366
-
2. Create the pod using the [kubectl apply](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) command:
370
+
2. Create the pod using the [kubectl apply][kubectl-apply] command:
367
371
368
372
```bash
369
373
kubectl apply -f iis-smb.yaml
370
374
```
371
375
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:
376
+
3. Verify the pod is *Running* and `/inetpub/wwwroot` is mounted from SMB by using the [`kubectl describe`][kubectl-describe] command:
373
377
374
378
```bash
375
379
kubectl describe pod iis-pod
376
380
```
377
381
378
-
The output of the command resembles the following example:
382
+
The output of the command resembles the following example:
379
383
380
384
```output
381
385
Name: iis-pod
@@ -413,12 +417,13 @@ You must install a Container Storage Interface (CSI) driver to create a Kubernet
413
417
...
414
418
```
415
419
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.
420
+
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
421
418
422
```bash
419
423
kubectl exec -it iis-pod –- cmd.exe
420
424
```
421
-
The output of the command resembles the following example:
425
+
426
+
The output of the command resembles the following example:
422
427
423
428
```output
424
429
Microsoft Windows [Version 10.0.20348.1668]
@@ -449,37 +454,20 @@ Astra Trident supports many features with Azure NetApp Files. For more informati
0 commit comments