Skip to content

Commit

Permalink
remove dynamic provisioning examples
Browse files Browse the repository at this point in the history
  • Loading branch information
songjiaxun committed May 15, 2023
1 parent 5b62ec6 commit e9dd5ac
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 432 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ The driver natively supports the following ways for you to provision your Cloud

* **Static provisioning**: You create a PersistentVolume resource that refers to the Cloud Storage buckets bucket. Your client Pod can then reference a PersistentVolumeClaim that is bound to this PersistentVolume. To learn more about this workflow, see [Configure a Pod to Use a PersistentVolume for Storage](https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/).

Currently, the driver does not support [Dynamic Volume Provisioning](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/).

### Benefits

* The Cloud Storage FUSE CSI driver on your cluster turns on automatic deployment and management of the driver. The driver works on both GKE Standard and Autopilot clusters. To leverage this benefit, you need to use GKE to automatically deploy and manage the CSI driver as a add-on feature. See the GKE documentation [Access Cloud Storage buckets with the Cloud Storage FUSE CSI driver](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/cloud-storage-fuse-csi-driver).
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ The Cloud Storage FUSE CSI driver allows developers to use standard Kubernetes A
1. [Static Provisioning](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#static) using a PersistentVolumeClaim bound to the PersistentVolume
2. Using [CSI Ephemeral Inline volumes](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#csi-ephemeral-volumes)

The Cloud Storage FUSE CSI driver natively supports the above volume configuration methods. Currently, the [Dynamic Provisioning](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#dynamic) is not officially supported.
The Cloud Storage FUSE CSI driver natively supports the above volume configuration methods. Currently, the driver does not support [Dynamic Volume Provisioning](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/).

### Prepare to mount Cloud Storage FUSE buckets

Expand Down
45 changes: 10 additions & 35 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,17 @@
# Example Applications

## Install the CSI driver

See the documentation [Cloud Storage FUSE CSI Driver Installation](../docs/installation.md).

## Set up access to GCS buckets

See the documentation [Cloud Storage FUSE CSI Driver Usage](../docs/usage.md#set-up-access-to-gcs-buckets-via-gke-workload-identity).

## Install Example Applications
### Dynamic Provisioning Example (Unstable)
```bash
# create a secret containing the Kubernetes Service Account information
kubectl create secret generic gcs-csi-secret --namespace gcs-csi-example \
--from-literal=projectID=${GCS_BUCKET_PROJECT_ID} \
--from-literal=serviceAccountName=gcs-csi \
--from-literal=serviceAccountNamespace=gcs-csi-example

# deloy a StorageClass for non-root usage
kubectl apply -f ./examples/dynamic/storageclass-non-root.yaml

# deploy Deployment
kubectl apply -f ./examples/dynamic/deployment.yaml
kubectl apply -f ./examples/dynamic/deployment-non-root.yaml

# deploy StatefulSet
kubectl apply -f ./examples/dynamic/statefulset.yaml
kubectl apply -f ./examples/dynamic/statefulset-non-root.yaml

# clean up
kubectl delete -f ./examples/dynamic/deployment.yaml
kubectl delete -f ./examples/dynamic/deployment-non-root.yaml
kubectl delete -f ./examples/dynamic/statefulset.yaml
kubectl delete -f ./examples/dynamic/statefulset-non-root.yaml

# After the StatefulSet application get uninstalled,
# you will need to clean up the PVCs manually.
kubectl delete -n gcs-csi-example pvc gcs-bucket-gcp-gcs-csi-dynamic-statefulset-example-0 gcs-bucket-gcp-gcs-csi-dynamic-statefulset-example-1 gcs-bucket-gcp-gcs-csi-dynamic-statefulset-example-2
kubectl delete -n gcs-csi-example pvc gcs-bucket-gcp-gcs-csi-dynamic-statefulset-non-root-example-0 gcs-bucket-gcp-gcs-csi-dynamic-statefulset-non-root-example-1 gcs-bucket-gcp-gcs-csi-dynamic-statefulset-non-root-example-2

# clean up the secret and non-root StorageClass after all the PVs are deleted
kubectl delete -f ./examples/dynamic/storageclass-non-root.yaml
kubectl delete secret gcs-csi-secret --namespace gcs-csi-example
```

### Static Provisioning Example

```bash
# replace <bucket-name> with your pre-provisioned GCS bucket name
GCS_BUCKET_NAME=your-bucket-name
Expand All @@ -60,6 +29,7 @@ kubectl delete -f ./examples/static/pv-pvc-deploymen-non-root.yaml
```

### Ephemeral Volume Example

```bash
# replace <bucket-name> with your pre-provisioned GCS bucket name
GCS_BUCKET_NAME=your-bucket-name
Expand All @@ -79,6 +49,7 @@ kubectl delete -f ./examples/ephemeral/deployment-two-vols.yaml
```

### Batch Job Example

```bash
# replace <bucket-name> with your pre-provisioned GCS bucket name
GCS_BUCKET_NAME=your-bucket-name
Expand All @@ -92,6 +63,7 @@ kubectl delete -f ./examples/batch-job/job.yaml
```

### Performance Testing

```bash
# replace <bucket-name> with your pre-provisioned GCS bucket name
GCS_BUCKET_NAME=your-bucket-name
Expand All @@ -106,6 +78,7 @@ kubectl delete -f ./examples/perf-test/pod.yaml
```

### Cloud Storage FUSE E2E Test

```bash
# replace <bucket-name> with your pre-provisioned GCS bucket name
GCS_BUCKET_NAME=your-bucket-name
Expand All @@ -120,6 +93,7 @@ kubectl delete -f ./examples/gcsfuse-e2e-test/pod.yaml
```

### PyTorch Application Example

```bash
# add a new nood pool with GPU
CLUSTER_NAME=<cluster-name>
Expand Down Expand Up @@ -155,6 +129,7 @@ kubectl delete -f ./examples/pytorch/train-job-pytorch.yaml
```

### Machine Learning Application Example

```bash
# replace <bucket-name> with your pre-provisioned GCS bucket name
GCS_BUCKET_NAME=your-bucket-name
Expand All @@ -168,4 +143,4 @@ kubectl port-forward jupyter-notebook-server 8888:8888

# clean up
kubectl delete -f ./examples/machineLearning/jupyter-notebook-server.yaml
```
```
97 changes: 0 additions & 97 deletions examples/dynamic/deployment-non-root.yaml

This file was deleted.

93 changes: 0 additions & 93 deletions examples/dynamic/deployment.yaml

This file was deleted.

Loading

0 comments on commit e9dd5ac

Please sign in to comment.