Skip to content

Commit 54c2983

Browse files
committed
Add CSI Windows Suppoort Doc
add doc for csi windows support
1 parent 53e8abd commit 54c2983

File tree

5 files changed

+93
-2
lines changed

5 files changed

+93
-2
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ This driver supports only one topology key:
6464
`topology.gke.io/zone`
6565
that represents availability by zone (e.g. `us-central1-c`, etc.).
6666

67+
### CSI Windows Support
68+
69+
GCE PD driver starts to support CSI Windows with [CSI Proxy] (https://github.com/kubernetes-csi/csi-proxy). It requires csi-proxy.exe to be installed on every Windows node. Please see more details in CSI Windows page (docs/kubernetes/user-guides/windows.md)
70+
6771
### Features in Development
6872

6973
| Feature | Stage | Min Kubernetes Master Version | Min Kubernetes Nodes Version | Min Driver Version | Deployment Overlay |
@@ -72,7 +76,7 @@ that represents availability by zone (e.g. `us-central1-c`, etc.).
7276
| Snapshots | Beta | 1.17 | Any | v1.0.0 | Stable |
7377
| Resize (Expand) | Alpha | 1.14 | 1.14 | v0.6.0 | Alpha |
7478
| Resize (Expand) | Beta | 1.16 | 1.16 | v0.7.0 | Stable |
75-
| Windows* | Beta | 1.18 | 1.18 | v1.1.0 | Stable |
79+
| Windows* | Beta | 1.18 | 1.18 | v1.1.0 | Alpha |
7680

7781
* For Windows, it is recommended to use this driver with CSI proxy v0.2.2+.
7882

docs/kubernetes/user-guides/basic.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Kubernetes 1.14.
88

99
See [instructions](driver-install.md)
1010

11-
## Zonal PD example
11+
## Zonal PD example for Linux or Windows cluster
1212
This example provisions a zonal PD in both single-zone and regional clusters.
1313

1414
1. Create example Zonal Storage Class
@@ -17,10 +17,16 @@ $ kubectl apply -f ./examples/kubernetes/demo-zonal-sc.yaml
1717
```
1818

1919
2. Create example PVC and Pod
20+
For Linux cluster,
2021
```
2122
$ kubectl apply -f ./examples/kubernetes/demo-pod.yaml
2223
```
2324

25+
For Windows cluster,
26+
```
27+
$ kubectl apply -f ./examples/kubernetes/demo-windows.yaml
28+
```
29+
2430
3. Verify PV is created and bound to PVC
2531
```
2632
$ kubectl get pvc
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Kubernetes CSI Windows User Guide
2+
3+
>**Attention:** CSI Windows Beta is only available in the driver version v1.1.0+
4+
>**Attention:** CSI Windows Alpha is only available in the driver version v1.0.0-v1.0.*
5+
6+
### Install CSI Proxy binary
7+
CSI proxy can be installed as binary or run as a Windows service on each Windows node. Please see details on CSI Proxy [installation and usage page](https://github.com/kubernetes-csi/csi-proxy/blob/master/README.md#usage).
8+
9+
If you are using kube-up to start a GCE Kubernetes cluster, starting Kubernetes 1.19, [CSI Proxy Alpha](https://github.com/kubernetes-csi/csi-proxy/releases/tag/v0.1.0) binary is automatically installed during node start up. In Kubernetes 1.20, [CSI Proxy Beta.2 v0.2.2](https://github.com/kubernetes-csi/csi-proxy/releases/tag/v0.2.2) is installed and running as a windows service to improve its stablibity.
10+
11+
For GKE cluster, starting from 1.18, [CSI Proxy Beta](https://github.com/kubernetes-csi/csi-proxy/releases/tag/v0.2.2) will be installed automatically. GCE PD driver will be also automatically deployed as daemonSet on GKE. Please follow instruction here to create a [GKE Windows cluster](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows).
12+
13+
14+
### Install Driver with CSI Windows support
15+
16+
1. [One-time per project] Create GCP service account for the CSI driver and set required roles
17+
18+
```
19+
$ PROJECT=your-project-here # GCP project
20+
$ GCE_PD_SA_NAME=my-gce-pd-csi-sa # Name of the service account to create
21+
$ GCE_PD_SA_DIR=/my/safe/credentials/directory # Directory to save the service account key
22+
$ ./deploy/setup-project.sh
23+
```
24+
25+
2. Deploy driver to Kubernetes Cluster
26+
27+
```
28+
$ GCE_PD_SA_DIR=/my/safe/credentials/directory # Directory to get the service account key
29+
$ GCE_PD_DRIVER_VERSION=alpha # Currently alpha deploy Driver version with Windows Alpha support. Will add beta supporot to beta GCE_PD_DRIVER_VERSION deployment script.
30+
$ ./deploy/kubernetes/deploy-driver.sh
31+
```
32+
33+
3. Create a pod on Windows node
34+
35+
See [instructions](basic.md)

examples/kubernetes/demo-windows.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
kind: PersistentVolumeClaim
2+
apiVersion: v1
3+
metadata:
4+
name: podpvc-windows
5+
spec:
6+
accessModes:
7+
- ReadWriteOnce
8+
storageClassName: csi-gce-pd-ntfs
9+
resources:
10+
requests:
11+
storage: 1Gi
12+
13+
---
14+
15+
apiVersion: v1
16+
kind: Pod
17+
metadata:
18+
name: web-windows
19+
spec:
20+
tolerations:
21+
- operator: Exists
22+
nodeSelector:
23+
kubernetes.io/os: windows
24+
containers:
25+
- name: web-server
26+
image: k8s.gcr.io/e2e-test-images/agnhost:2.21
27+
volumeMounts:
28+
- mountPath: /www/html
29+
name: mypvc
30+
volumes:
31+
- name: mypvc
32+
persistentVolumeClaim:
33+
claimName: podpvc-windows
34+
readOnly: false

examples/kubernetes/demo-zonal-sc.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,15 @@ provisioner: pd.csi.storage.gke.io
66
parameters:
77
type: pd-standard
88
volumeBindingMode: WaitForFirstConsumer
9+
10+
---
11+
#Zonal StorageClass for fsType ntfs
12+
apiVersion: storage.k8s.io/v1
13+
kind: StorageClass
14+
metadata:
15+
name: csi-gce-pd-ntfs
16+
provisioner: pd.csi.storage.gke.io
17+
parameters:
18+
type: pd-standard
19+
csi.storage.k8s.io/fstype: ntfs
20+
volumeBindingMode: WaitForFirstConsumer

0 commit comments

Comments
 (0)