Skip to content

Commit

Permalink
Update e2e_usage.md
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx authored Feb 2, 2020
1 parent e74ad83 commit 343e444
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions deploy/example/e2e_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,47 @@
#### 1. create a pod with csi azurefile driver mount on linux
##### Option#1: Azurefile Dynamic Provisioning
- Create an azurefile CSI storage class
```
```console
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/storageclass-azurefile-csi.yaml
```

- Create an azurefile CSI PVC
```
```console
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/pvc-azurefile-csi.yaml
```

##### Option#2: Azurefile Static Provisioning(use an existing azure file share)
- Use `kubectl create secret` to create `azure-secret` with existing storage account name and key
```
```console
kubectl create secret generic azure-secret --from-literal accountname=NAME --from-literal accountkey="KEY" --type=Opaque
```

- Create an azurefile CSI PV, download `pv-azurefile-csi.yaml` file and edit `shareName` in `volumeAttributes`
```
```console
wget https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/pv-azurefile-csi.yaml
vi pv-azurefile-csi.yaml
kubectl create -f pv-azurefile-csi.yaml
```

- Create an azurefile CSI PVC which would be bound to the above PV
```
```console
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/pvc-azurefile-csi-static.yaml
```

#### 2. validate PVC status and create an nginx pod
- make sure pvc is created and in `Bound` status finally
```
```console
watch kubectl describe pvc pvc-azurefile
```

- create a pod with azurefile CSI PVC
```
```console
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/nginx-pod-azurefile.yaml
```

#### 3. enter the pod container to do validation
- watch the status of pod until its Status changed from `Pending` to `Running` and then enter the pod container
```
```console
$ watch kubectl describe po nginx-azurefile
$ kubectl exec -it nginx-azurefile -- bash
root@nginx-azurefile:/# df -h
Expand Down

0 comments on commit 343e444

Please sign in to comment.