You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3,15 +3,15 @@ title: How to use SFS with Kubernetes Kapsule
3
3
description: This page explains how to use the Scaleway File Storage Container Storage Interface (CSI) driver to enable Kubernetes users to manage Scaleway File Storage volumes within their clusters.
The Scaleway File Storage Container Storage Interface (CSI) driver enables Kubernetes users to manage Scaleway File Storage volumes within their clusters.
14
+
The Scaleway File Storage Container Storage Interface (CSI) driver enables Kubernetes users to manage Scaleway File Storage volumes within their clusters.
15
15
The Scaleway File Storage CSI driver is designed to work with Kubernetes Kapsule and Kosmos clusters, providing a standardized interface to create, manage, and attach file storage volumes to your containerized workloads. For more details on Scaleway File Storage, refer to the [Scaleway File Storage documentation](https://www.scaleway.com/en/file-storage/).
16
16
17
17
## Supported features
@@ -28,8 +28,8 @@ The Scaleway File Storage CSI driver supports the following features:
28
28
- A Scaleway account logged into the [console](https://console.scaleway.com)
29
29
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
30
30
-[Created](/kubernetes/how-to/create-cluster/) a Kubernetes Kapsule cluster
31
-
- Helm installed for deploying the CSI driver.
32
-
- Access to the Scaleway File Storage API.
31
+
- Helm installed for deploying the CSI driver
32
+
- Access to the Scaleway File Storage API
33
33
34
34
## Installation
35
35
@@ -39,9 +39,10 @@ The Scaleway File Storage CSI driver can be installed using Helm. Follow these s
39
39
```bash
40
40
helm repo add scaleway https://helm.scw.cloud/
41
41
helm repo update
42
-
```
42
+
```
43
+
44
+
2. Deploy the Scaleway File Storage CSI Driver:
43
45
44
-
2. Deploy the Scaleway File Storage CSI Driver. Use the Helm chart to install the driver, configuring it with your Scaleway credentials and default zone:
@@ -52,7 +53,8 @@ The Scaleway File Storage CSI driver can be installed using Helm. Follow these s
52
53
53
54
Replace `<your-project-id>`, `<your-access-key>`, and `<your-secret-key>` with your Scaleway credentials.
54
55
55
-
3. Check that the CSI driver pods are running in the `kube-system` namespace:
56
+
3. Check that the CSI driver pods are running:
57
+
56
58
```bash
57
59
kubectl get pods -n kube-system -l app=scaleway-filestorage-csi
58
60
```
@@ -61,100 +63,105 @@ The Scaleway File Storage CSI driver can be installed using Helm. Follow these s
61
63
62
64
## Using the Scaleway File Storage CSI Driver
63
65
64
-
The Scaleway File Storage CSI driver supports dynamic provisioning of Persistent Volumes (PVs) and Persistent Volume Claims (PVCs) in Kubernetes. Below are examples of how to use the driver to create and manage file storage volumes.
66
+
The CSI driver supports dynamic provisioning of Persistent Volumes (PVs) and Persistent Volume Claims (PVCs).
65
67
66
68
### Creating a Persistent Volume Claim (PVC)
67
69
68
-
This example demonstrates how to create a PVC to dynamically provision a Scaleway File Storage volume and use it in a pod.
69
-
70
-
1. Create a file named `pvc.yaml` with the following content:
70
+
1. Create a file named `pvc.yaml`:
71
71
72
72
```yaml
73
73
apiVersion: v1
74
74
kind: PersistentVolumeClaim
75
75
metadata:
76
-
name: my-file-pvc
76
+
name: my-pvc
77
77
spec:
78
78
accessModes:
79
79
- ReadWriteMany
80
80
resources:
81
81
requests:
82
-
storage: 10Gi
83
-
storageClassName: scaleway-file-default
82
+
storage: 100Gi
83
+
storageClassName: scw-fs
84
84
```
85
85
86
-
Apply the PVC:
86
+
Apply it:
87
+
87
88
```bash
88
89
kubectl apply -f pvc.yaml
89
90
```
90
91
91
-
2. Create a file named `pod.yaml` to define a pod that uses the PVC:
92
+
2. Create a file named `pod.yaml`:
92
93
93
94
```yaml
94
95
apiVersion: v1
95
96
kind: Pod
96
97
metadata:
97
-
name: my-file-app
98
+
name: my-app
98
99
spec:
99
100
containers:
100
-
- name: busybox
101
-
image: busybox
102
-
command: ["sleep", "3600"]
103
-
volumeMounts:
104
-
- mountPath: "/data"
105
-
name: file-volume
101
+
- name: my-busybox
102
+
image: busybox
103
+
volumeMounts:
104
+
- name: my-volume
105
+
mountPath: "/data"
106
+
command: ["/bin/sh", "-c"]
107
+
args: ["tail -f /dev/null"]
106
108
volumes:
107
-
- name: file-volume
108
-
persistentVolumeClaim:
109
-
claimName: my-file-pvc
109
+
- name: my-volume
110
+
persistentVolumeClaim:
111
+
claimName: my-pvc
110
112
```
111
113
112
114
Apply the pod configuration:
115
+
113
116
```bash
114
117
kubectl apply -f pod.yaml
115
118
```
116
119
117
-
3. Check that the pod is running and the volume is mounted:
120
+
3. Verify the mount:
121
+
118
122
```bash
119
123
kubectl get pods
120
-
kubectl exec -it my-file-app -- df -h /data
124
+
kubectl exec -it my-app -- df -h /data
121
125
```
122
126
123
-
The output should show the mounted Scaleway File Storage volume at `/data`.
124
-
125
127
### Importing an existing File Storage volume
126
128
127
-
You can import an existing Scaleway File Storage volume into Kubernetes using the Scaleway File Storage CSI driver. This is useful for integrating pre-existing storage volumes into your cluster.
128
-
129
-
1. Create a file named `pv-import.yaml` to define a PV that references an existing Scaleway File Storage volume:
0 commit comments