Skip to content

Commit 41c0c3f

Browse files
authored
feat: add EVS documents (#27)
1 parent a09c390 commit 41c0c3f

File tree

14 files changed

+465
-28
lines changed

14 files changed

+465
-28
lines changed

README.md

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
# SFS CSI Driver for Kubernetes
2-
Huawei Cloud SFS Container Storage Interface (CSI) Plugin `sfs.csi.huaweicloud.com`
3-
4-
### Prerequisite
5-
- The driver initialization depends on a [cloud config file](./deploy/cloud-config). Make sure it's in `/etc/sfs/cloud-config` on your node.
6-
7-
### Install SFS CSI driver
8-
9-
```
10-
kubectl apply -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/deploy/sfs-csi-plugin/kubernetes/rbac-csi-sfs-controller.yaml
11-
kubectl apply -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/deploy/sfs-csi-plugin/kubernetes/rbac-csi-sfs-node.yaml
12-
kubectl apply -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/deploy/sfs-csi-plugin/kubernetes/csi-sfs-controller.yaml
13-
kubectl apply -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/deploy/sfs-csi-plugin/kubernetes/csi-sfs-node.yaml
14-
kubectl apply -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/deploy/sfs-csi-plugin/kubernetes/csi-sfs-driver.yaml
15-
```
16-
17-
### Examples
18-
19-
```
20-
kubectl apply -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/sfs-csi-plugin/kubernetes/sc.yaml
21-
kubectl apply -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/sfs-csi-plugin/kubernetes/pvc.yaml
22-
kubectl apply -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/sfs-csi-plugin/kubernetes/pod.yaml
23-
```
24-
25-
### Links
26-
- [Kubernetes CSI Documentation](https://kubernetes-csi.github.io/docs/Home.html)
27-
- [CSI Drivers](https://github.com/kubernetes-csi/drivers)
28-
- [Container Storage Interface (CSI) Specification](https://github.com/container-storage-interface/spec)
1+
# Huawei Cloud CSI Plugin
2+
3+
English | [简体中文](./README_CN.md)
4+
5+
The Huawei Cloud CSI plugin provides interfaces used by Container Orchestrators to manage the lifecycle of
6+
Huawei Cloud storage service. Users can easily access the Huawei Cloud storage service through these plugins.
7+
8+
This repository hosts various plugins relevant to Huawei Cloud and Kubernetes integration.
9+
10+
### EVS CSI Plugin
11+
12+
EVS CSI Plugin supports volume creation, attaching and expansion.
13+
Volume supports ReadWriteOnce mode and can only be attached to one server at the same time.
14+
15+
See [EVS CSI Plugin](./docs/evs/evs.md) for details.
16+
17+
## Links
18+
19+
- [Kubernetes CSI Documentation](https://kubernetes-csi.github.io/docs/Home.html)
20+
- [CSI Drivers](https://github.com/kubernetes-csi/drivers)
21+
- [Container Storage Interface (CSI) Specification](https://github.com/container-storage-interface/spec)

README_CN.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 华为云CSI插件
2+
3+
[English](./README.md) | 简体中文
4+
5+
华为云存储插件对接了华为云平台的云存储服务,使用者通过这个插件可以很方便的接入华为云存储服务。
6+
7+
该存储库包含与华为云和Kubernetes集成相关的各种插件。
8+
9+
### 云硬盘插件
10+
11+
EVS CSI 插件支持卷的创建、挂载和扩容。云硬盘支持ReadWriteOnce模式并且只能挂载一台服务器。
12+
13+
更多详情请参考[云硬盘](./docs/evs/evs.md)
14+
15+
## Lin链接
16+
17+
- [Kubernetes CSI 文档](https://kubernetes-csi.github.io/docs/Home.html)
18+
- [CSI 驱动](https://github.com/kubernetes-csi/drivers)
19+
- [Container Storage Interface (CSI) 规格](https://github.com/container-storage-interface/spec)

deploy/cloud-config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Global]
2+
cloud=
3+
auth-url=
4+
region=
5+
access-key=
6+
secret-key=
7+
project-id=
8+
[Vpc]
9+
#The VPC where your cluster resides
10+
id=

docs/cloud-config.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Description of cloud config
2+
3+
## File Structure
4+
```
5+
[Global]
6+
cloud=
7+
auth-url=
8+
region=
9+
access-key=
10+
secret-key=
11+
project-id=
12+
[Vpc]
13+
id=
14+
```
15+
16+
## Introduction
17+
18+
* Fields listed in the file are used to construct API request parameters, and complete identity authentication
19+
20+
### Global
21+
22+
* `cloud` Optional. The endpoint of the cloud provider. Defaults to 'myhuaweicloud.com'.
23+
24+
* `auth-url` Optional. The Identity authentication URL. Defaults to 'https://iam.{cloud}:443/v3/'.
25+
26+
* `region` Required. This is the Huawei Cloud region.
27+
28+
* `access-key` Required. The access key of the Huawei Cloud to use.
29+
30+
* `secret-key` Required. The secret key of the Huawei Cloud to use.
31+
32+
* `project-id` Required. Default Enterprise Project ID for supported resources.
33+
34+
### Vpc
35+
36+
* `id` Optional. The VPC where your cluster resides, it is required for SFS.

docs/evs/evs-block.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Using Block Volume
2+
3+
## Prerequisites
4+
5+
- kubernetes, EVS CSI Plugin
6+
7+
## How to use
8+
9+
### Step 1: Create SC
10+
11+
```
12+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/block/sc.yaml
13+
```
14+
15+
### Step 2: Create PVC
16+
17+
```
18+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/block/pvc.yaml
19+
```
20+
21+
### Step 3: Create POD
22+
23+
```
24+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/block/pod.yaml
25+
```
26+
27+
### Step 4: Check status of POD/PVC/PV
28+
29+
```
30+
# kubectl get pod
31+
NAME READY STATUS RESTARTS AGE
32+
test-evs-block-nginx 1/1 Running 0 38s
33+
34+
```
35+
36+
```
37+
# kubectl get pvc
38+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
39+
evs-block-pvc Bound pvc-ffe70549-c77a-46be-9d11-df45063cffd2 10Gi RWX evs-sc 67s
40+
```
41+
42+
```
43+
# kubectl get pv
44+
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
45+
pvc-ffe70549-c77a-46be-9d11-df45063cffd2 10Gi RWX Delete Bound default/evs-block-pvc evs-sc 79s
46+
```

docs/evs/evs-ephemeral.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Ephemeral Volume
2+
3+
## Prerequisites
4+
5+
- kubernetes, EVS CSI Plugin
6+
7+
## How to use
8+
9+
### Step 1: Create SC
10+
11+
```
12+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/ephemeral/sc.yaml
13+
```
14+
15+
### Step 2: Create POD
16+
17+
```
18+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/ephemeral/pod.yaml
19+
```
20+
21+
### Step 3: Check status of POD/PVC/PV
22+
23+
```
24+
# kubectl get pod
25+
NAME READY STATUS RESTARTS AGE
26+
ephemeral-example-nginx 1/1 Running 0 86s
27+
28+
```
29+
30+
```
31+
# kubectl get pvc
32+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
33+
ephemeral-example-nginx-scratch-volume Bound pvc-9bb98461-b58e-4ea2-86e4-e32c02124433 10Gi RWO scratch-storage-class 25s
34+
```
35+
36+
```
37+
# kubectl get pv
38+
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
39+
pvc-9bb98461-b58e-4ea2-86e4-e32c02124433 10Gi RWO Delete Bound default/ephemeral-example-nginx-scratch-volume scratch-storage-class 32s
40+
```

docs/evs/evs-normal.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Dynamic Provisioning
2+
3+
## Prerequisites
4+
5+
- kubernetes, EVS CSI Plugin
6+
7+
## How to use
8+
9+
### Step 1: Create SC
10+
11+
```
12+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/normal/sc.yaml
13+
```
14+
15+
### Step 2: Create PVC
16+
17+
```
18+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/normal/pvc.yaml
19+
```
20+
21+
### Step 3: Create POD
22+
23+
```
24+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/normal/pod.yaml
25+
```
26+
27+
### Step 4: Check status of POD/PVC/PV
28+
29+
```
30+
# kubectl get pod
31+
NAME READY STATUS RESTARTS AGE
32+
test-evs-normal-nginx 1/1 Running 0 68s
33+
```
34+
35+
```
36+
# kubectl get pvc
37+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
38+
evs-normal-pvc Bound pvc-b8c99f2b-8028-438b-8a0c-d6c493301d98 10Gi RWX evs-sc 26s
39+
```
40+
41+
```
42+
# kubectl get pv
43+
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
44+
pvc-b8c99f2b-8028-438b-8a0c-d6c493301d98 10Gi RWX Delete Bound default/evs-normal-pvc evs-sc 28s
45+
```

docs/evs/evs-resize.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Volume Expansion
2+
3+
## Prerequisites
4+
5+
- kubernetes, EVS CSI Plugin
6+
7+
## How to use
8+
9+
### Step 1: Create SC
10+
11+
```
12+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/resize/sc.yaml
13+
```
14+
15+
### Step 2: Create PVC
16+
17+
```
18+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/resize/pvc.yaml
19+
```
20+
21+
### Step 3: Create POD
22+
23+
```
24+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/resize/pod.yaml
25+
```
26+
27+
### Step 4: Check status of POD/PVC/PV
28+
29+
```
30+
# kubectl get pod
31+
NAME READY STATUS RESTARTS AGE
32+
test-evs-resize-nginx 1/1 Running 0 63s
33+
34+
```
35+
36+
```
37+
# kubectl get pvc
38+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
39+
evs-normal-resize-pvc Bound pvc-54ed5cc9-928f-4dd2-98ab-d4da9c2ec5f6 10Gi RWX evs-sc 17s
40+
```
41+
42+
```
43+
# kubectl get pv
44+
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
45+
pvc-54ed5cc9-928f-4dd2-98ab-d4da9c2ec5f6 10Gi RWX Delete Bound default/evs-normal-resize-pvc evs-sc 16s
46+
```
47+
48+
### Step 5: Resize volume storage
49+
50+
```
51+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/resize/pvc2.yaml
52+
```
53+
54+
### Step 6: Check filesystem size after resized on the running POD
55+
56+
```
57+
$ kubectl exec test-evs-resize-nginx -- df -h /var/lib/www/html
58+
Filesystem Size Used Avail Use% Mounted on
59+
/dev/vdb 20G 44M 20G 1% /var/lib/www/html
60+
```

docs/evs/evs-snapshot.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Snapshot Create and Restore
2+
3+
## Prerequisites
4+
5+
- kubernetes, EVS CSI Plugin
6+
7+
## How to use
8+
9+
### Step 1: Create SC
10+
11+
```
12+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/snapshot/sc.yaml
13+
```
14+
15+
### Step 2: Create PVC
16+
17+
```
18+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/snapshot/pvc.yaml
19+
```
20+
21+
### Step 3: Check status of PVC/PV
22+
23+
```
24+
# kubectl get pvc
25+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
26+
evs-snapshot-pvc Bound pvc-e164374c-eb41-4eb6-951e-1194f141058f 10Gi RWO evs-sc 34s
27+
```
28+
29+
```
30+
# kubectl get pv
31+
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
32+
pvc-e164374c-eb41-4eb6-951e-1194f141058f 10Gi RWO Delete Bound default/evs-snapshot-pvc evs-sc 52s
33+
```
34+
35+
### Step 4: Create VolumeSnapshotClass
36+
37+
```
38+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/snapshot/snapshot-class.yaml
39+
```
40+
41+
### Step 5: Create snapshot
42+
43+
```
44+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/snapshot/snapshot-create.yaml
45+
```
46+
47+
### Step 6: Restore PVC by snapshot
48+
49+
```
50+
kubectl create -f https://raw.githubusercontent.com/huaweicloud/huaweicloud-csi-driver/master/examples/evs-csi-plugin/kubernetes/snapshot/snapshot-restore.yaml
51+
```
52+
53+
### Step 7: Check restore PVC
54+
55+
```
56+
# kubectl get pvc
57+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
58+
evs-snapshot-pvc Bound pvc-e164374c-eb41-4eb6-951e-1194f141058f 10Gi RWO evs-sc 2m45s
59+
snapshot-demo-restore Bound pvc-4816cf76-2e6a-4722-a33d-bfc14719d673 10Gi RWO evs-sc 24s
60+
```

0 commit comments

Comments
 (0)