Skip to content

Add CSI Windows Support Doc #618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ This driver supports only one topology key:
`topology.gke.io/zone`
that represents availability by zone (e.g. `us-central1-c`, etc.).

### CSI Windows Support

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)

### Features in Development

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

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

Expand Down
8 changes: 7 additions & 1 deletion docs/kubernetes/user-guides/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Kubernetes 1.14.

See [instructions](driver-install.md)

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

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

2. Create example PVC and Pod
For Linux cluster,
```
$ kubectl apply -f ./examples/kubernetes/demo-pod.yaml
```

For Windows cluster,
```
$ kubectl apply -f ./examples/kubernetes/demo-windows.yaml
```

3. Verify PV is created and bound to PVC
```
$ kubectl get pvc
Expand Down
35 changes: 35 additions & 0 deletions docs/kubernetes/user-guides/windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Kubernetes CSI Windows User Guide

>**Attention:** CSI Windows Beta is only available in the driver version v1.1.0+
>**Attention:** CSI Windows Alpha is only available in the driver version v1.0.0-v1.0.*

### Install CSI Proxy binary
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).

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.

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).


### Install Driver with CSI Windows support

1. [One-time per project] Create GCP service account for the CSI driver and set required roles

```
$ PROJECT=your-project-here # GCP project
$ GCE_PD_SA_NAME=my-gce-pd-csi-sa # Name of the service account to create
$ GCE_PD_SA_DIR=/my/safe/credentials/directory # Directory to save the service account key
$ ./deploy/setup-project.sh
```

2. Deploy driver to Kubernetes Cluster

```
$ GCE_PD_SA_DIR=/my/safe/credentials/directory # Directory to get the service account key
$ 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.
$ ./deploy/kubernetes/deploy-driver.sh
```

3. Create a pod on Windows node

See [instructions](basic.md)
34 changes: 34 additions & 0 deletions examples/kubernetes/demo-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: podpvc-windows
spec:
accessModes:
- ReadWriteOnce
storageClassName: csi-gce-pd-ntfs
resources:
requests:
storage: 1Gi

---

apiVersion: v1
kind: Pod
metadata:
name: web-windows
spec:
tolerations:
- operator: Exists
nodeSelector:
kubernetes.io/os: windows
containers:
- name: web-server
image: k8s.gcr.io/e2e-test-images/agnhost:2.21
volumeMounts:
- mountPath: /www/html
name: mypvc
volumes:
- name: mypvc
persistentVolumeClaim:
claimName: podpvc-windows
readOnly: false
12 changes: 12 additions & 0 deletions examples/kubernetes/demo-zonal-sc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ provisioner: pd.csi.storage.gke.io
parameters:
type: pd-standard
volumeBindingMode: WaitForFirstConsumer

---
#Zonal StorageClass for fsType ntfs
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csi-gce-pd-ntfs
provisioner: pd.csi.storage.gke.io
parameters:
type: pd-standard
csi.storage.k8s.io/fstype: ntfs
volumeBindingMode: WaitForFirstConsumer