-
Notifications
You must be signed in to change notification settings - Fork 260
feat(k8s): re-add managing storage doc #3914
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
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| --- | ||
| meta: | ||
| title: Managing Block Storage volumes with Scaleway CSI | ||
| description: Learn how to manage Block Storage volumes using Scaleway's CSI driver on Kubernetes Kapsule and Kosmos clusters. | ||
| content: | ||
| h1: Managing Block Storage volumes with Scaleway CSI | ||
| paragraph: Learn how to manage Block Storage volumes using Scaleway's CSI driver on Kubernetes Kapsule and Kosmos clusters. | ||
| tags: block-storage scaleway-csi kubernetes pvc | ||
| dates: | ||
| validation: 2024-09-25 | ||
| posted: 2021-08-12 | ||
| categories: | ||
| - kubernetes | ||
| --- | ||
|
|
||
| The [Scaleway Block Volume](https://www.scaleway.com/en/block-storage/) Container Storage Interface (CSI) driver is an implementation of the [CSI interface](https://github.com/container-storage-interface/spec/blob/master/spec.md) to provide a way to manage Scaleway Block Volumes through a container orchestration system, like Kubernetes. It is installed by default on every Kubernetes Kapsule and Kosmos cluster. | ||
|
|
||
| <Macro id="requirements" /> | ||
|
|
||
| - A Scaleway account logged into the [console](https://console.scaleway.com) | ||
| - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization | ||
| - A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) | ||
| - Your Scaleway Project or Organization ID | ||
| - [Created](/containers/kubernetes/how-to/create-cluster/) a Kubernetes cluster running on Scaleway Instances (v1.21+) | ||
|
|
||
| <Message type="tip"> | ||
| Refer to our video tutorial [Getting Started with Kubernetes Part 4 - Storage](/containers/kubernetes/videos/) to view a visual presentation and step-by-step guidance of how to manage Block Storage volumes on Kubernetes with the Scaleway CSI. | ||
| </Message> | ||
|
|
||
| ## Verification of CSI driver status | ||
|
|
||
| To verify if the driver is running, use the following command: | ||
|
|
||
| ```bash | ||
| kubectl get csidriver | ||
| ``` | ||
|
|
||
| The output of this command provides a quick status update on the CSI plugin within your Kubernetes cluster. For the latest features and enhancements, consider upgrading to [release 0.3](https://github.com/scaleway/scaleway-csi/tree/release-0.3#block-storage-low-latency), which supports **[Block Storage low latency](/storage/block/quickstart/)** volumes. | ||
|
|
||
| To identify your current CSI release version, navigate to the [Cockpit interface](/observability/cockpit/how-to/access-grafana-and-managed-dashboards/), specifically the **Kubernetes Cluster - Overview** dashboard. | ||
|
|
||
| ## Upgrading to CSI version 0.3 | ||
|
|
||
| ### Using the API with curl | ||
|
|
||
| You can trigger the migration to SBS-CSI using the following `curl` command: | ||
|
|
||
| ```bash | ||
| curl "https://api.scaleway.com/k8s/v1/regions/$REGION/clusters/$CLUSTER_ID/migrate-to-sbs-csi" \ | ||
| -X POST \ | ||
| -H "X-Auth-Token: $TOKEN" | ||
| ``` | ||
|
|
||
| Replace the placeholders with the following: | ||
|
|
||
| - `$REGION`: Your cluster's region (e.g., `fr-par`, `nl-ams`). | ||
| - `$CLUSTER_ID`: Your cluster ID. | ||
| - `$TOKEN`: Your Scaleway API token. | ||
|
|
||
| This command will initiate the migration process for your cluster to the new SBS-CSI. | ||
|
|
||
| ### Using the Scaleway CLI | ||
|
|
||
| Alternatively, you can use the Scaleway CLI to perform the migration. Ensure the CLI is installed and configured with your API credentials. | ||
|
|
||
| 1. Install and configure the Scaleway CLI, if you have not already: | ||
| ```bash | ||
| scw init | ||
| ``` | ||
|
|
||
| 2. Run the migration command: | ||
|
|
||
| ```bash | ||
| scw k8s cluster migrate-to-sbs-csi $CLUSTER_ID --region=$REGION | ||
| ``` | ||
|
|
||
| Replace `$REGION` and `$CLUSTER_ID` with your cluster’s region and ID, respectively. | ||
|
|
||
| ### Post-migration verification | ||
|
|
||
| After initiating the migration, the cluster status will change to _updating_. Once the migration completes, you can verify that the CSI driver has been updated and that the new driver properly handles Persistent Volume Claims (PVCs). | ||
|
|
||
| ```bash | ||
| kubectl get csidriver | ||
| ``` | ||
|
|
||
| This command will confirm that the migration was successful. | ||
|
|
||
| ## Going further | ||
|
|
||
| * [Creating persistent volumes with Scaleway Block Storage](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#pvc--deployment) | ||
| * [Creating raw block volumes](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#raw-block-volumes) | ||
| * [Importing existing Scaleway volumes](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#importing-existing-scaleway-volumes) | ||
| * [Creating volume snapshots](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#volume-snapshots) | ||
| * [Importing volume snapshots](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#importing-snapshots) | ||
| * [How to crate a storage class](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#different-storageclass) | ||
| * [How to choose a zone for the volumes](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#specify-in-which-zone-the-volumes-are-going-to-be-created) | ||
| * [How to choose the number of IOPS](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#choose-the-number-of-iops) | ||
| <Message type="tip"> | ||
| * `sbs-5k` and `sbs-15k` are pre-configured storage classes designed to meet your IOPS requirements. You can achieve the equivalent of setting `iops:5k` in your custom class. | ||
| </Message> | ||
| * [Encrypting volumes](https://github.com/scaleway/scaleway-csi/tree/release-0.3/examples/kubernetes#encrypting-volumes) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.