Skip to content

Commit 1687c3f

Browse files
authored
Merge pull request #280 from andyzhangx/nfs-doc-fix
doc: fix NFS doc naming issue
2 parents 335ce9e + 6d4618f commit 1687c3f

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

deploy/example/nfs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ az provider register --namespace Microsoft.Storage
3333
apiVersion: storage.k8s.io/v1
3434
kind: StorageClass
3535
metadata:
36-
name: blob
36+
name: blob-nfs
3737
provisioner: blob.csi.azure.com
3838
parameters:
3939
resourceGroup: EXISTING_RESOURCE_GROUP_NAME # optional, only set this when storage account is not in the same resource group as agent node
@@ -51,7 +51,7 @@ kubectl create -f storageclass-blob-nfs.yaml
5151
### Example
5252
- Create a deployment with NFSv3 on Azure storage
5353
```console
54-
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blob-csi-driver/master/deploy/example/statefulset.yaml
54+
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blob-csi-driver/master/deploy/example/nfs/statefulset.yaml
5555
```
5656

5757
- enter pod to check

deploy/example/nfs/statefulset.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: StatefulSet
4+
metadata:
5+
name: statefulset-blob
6+
labels:
7+
app: nginx
8+
spec:
9+
serviceName: statefulset-blob
10+
replicas: 1
11+
template:
12+
metadata:
13+
labels:
14+
app: nginx
15+
spec:
16+
nodeSelector:
17+
"kubernetes.io/os": linux
18+
containers:
19+
- name: statefulset-blob
20+
image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
21+
command:
22+
- "/bin/sh"
23+
- "-c"
24+
- while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
25+
volumeMounts:
26+
- name: persistent-storage
27+
mountPath: /mnt/blob
28+
updateStrategy:
29+
type: RollingUpdate
30+
selector:
31+
matchLabels:
32+
app: nginx
33+
volumeClaimTemplates:
34+
- metadata:
35+
name: persistent-storage
36+
annotations:
37+
volume.beta.kubernetes.io/storage-class: blob-nfs
38+
spec:
39+
accessModes: ["ReadWriteMany"]
40+
resources:
41+
requests:
42+
storage: 100Gi

deploy/example/storageclass-blob-nfs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: storage.k8s.io/v1
33
kind: StorageClass
44
metadata:
5-
name: blob
5+
name: blob-nfs
66
provisioner: blob.csi.azure.com
77
parameters:
88
storageAccount: EXISTING_STORAGE_ACCOUNT_NAME

0 commit comments

Comments
 (0)