All Projects → linode → linode-blockstorage-csi-driver

linode / linode-blockstorage-csi-driver

Licence: Apache-2.0 license
Container Storage Interface (CSI) Driver for Linode Block Storage

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to linode-blockstorage-csi-driver

moosefs-csi
Container Storage Interface (CSI) for MooseFS
Stars: ✭ 44 (-12%)
Mutual labels:  storage, volume, csi
ibm-spectrum-scale-csi
The IBM Spectrum Scale Container Storage Interface (CSI) project enables container orchestrators, such as Kubernetes and OpenShift, to manage the life-cycle of persistent storage.
Stars: ✭ 41 (-18%)
Mutual labels:  storage, csi
synology-csi
Container Storage Interface (CSI) for Synology
Stars: ✭ 136 (+172%)
Mutual labels:  storage, csi
lvm-localpv
CSI Driver for dynamic provisioning of Persistent Local Volumes for Kubernetes using LVM.
Stars: ✭ 86 (+72%)
Mutual labels:  storage, csi
pvc-autoresizer
Auto-resize PersistentVolumeClaim objects based on Prometheus metrics
Stars: ✭ 124 (+148%)
Mutual labels:  storage, pvc
Maya
Manage Container Attached Storage (CAS) - Data Engines in Kubernetes
Stars: ✭ 169 (+238%)
Mutual labels:  storage, volume
carina
Carina: an high performance and ops-free local storage for kubernetes
Stars: ✭ 256 (+412%)
Mutual labels:  storage, csi
Volplugin
**EXPERIMENTAL** Contiv Storage: Policy backed Clustered Storage (via Ceph or NFS) for Docker
Stars: ✭ 217 (+334%)
Mutual labels:  storage, volume
bitcrust
Bitcoin software suite
Stars: ✭ 61 (+22%)
Mutual labels:  storage
Pomegranate
🌳 A tiny skiplist based log-structured merge-tree written in Rust.
Stars: ✭ 20 (-60%)
Mutual labels:  storage
apollo-cache-instorage
Apollo Cache implementation that facilitates locally storing resources
Stars: ✭ 98 (+96%)
Mutual labels:  storage
drive-desktop
internxt.com/drive
Stars: ✭ 102 (+104%)
Mutual labels:  storage
MusicX
MusicX is a music player 🎵 android app built using Kotlin and Jetpack Compose. It follows M.A.D. practices and hence is a good learning resource for beginners
Stars: ✭ 85 (+70%)
Mutual labels:  storage
freenas-iscsi-provisioner
FreeNAS iscsi provisioner
Stars: ✭ 30 (-40%)
Mutual labels:  csi
awesome-storage
A curated list of storage open source tools. Backups, redundancy, sharing, distribution, encryption, etc.
Stars: ✭ 324 (+548%)
Mutual labels:  storage
funcd
Daemon for functional keys (works without X11)
Stars: ✭ 14 (-72%)
Mutual labels:  volume
backup-docker
A simple command line tool to backup and restore docker containers along with their volumes
Stars: ✭ 58 (+16%)
Mutual labels:  volume
storage
A library to use Web Storage API with Observables
Stars: ✭ 43 (-14%)
Mutual labels:  storage
csi-nfs
A Container Storage Interface (CSI) plug-in that provides network file system (NFS) support.
Stars: ✭ 32 (-36%)
Mutual labels:  csi
soundfixer
A WebExtension that lets you fix sound problems in e.g. YouTube videos
Stars: ✭ 102 (+104%)
Mutual labels:  volume

Linode Block Storage CSI Driver Build Status

Overview

The Container Storage Interface (CSI) Driver for Linode Block Storage enables container orchestrators such as Kubernetes to manage the life-cycle of persistant storage claims.

More information about the Kubernetes CSI can be found in the GitHub Kubernetes CSI and CSI Spec repos.

Deployment

Requirements

  • Kubernetes v1.16+
  • The node hostname must match the Linode Instance label

Secure a Linode API Access Token:

Generate a Personal Access Token (PAT) using the Linode Cloud Manager.

This token will need:

  • Read/Write access to Volumes (to create and delete volumes)
  • Read/Write access to Linodes (to attach and detach volumes)
  • A sufficient "Expiry" to allow for continued use of your volumes

Create a Kubernetes secret

Run the following commands to stash a LINODE_TOKEN in your Kubernetes cluster:

read -s -p "Linode API Access Token: " LINODE_TOKEN
read -p "Linode Region of Cluster: " LINODE_REGION
cat <<EOF | kubectl create -f -

Paste the following text at the prompt:

apiVersion: v1
kind: Secret
metadata:
  name: linode
  namespace: kube-system
stringData:
  token: "$LINODE_TOKEN"
  region: "$LINODE_REGION"
EOF

You should receive notification that the secret was created. You can confirm this by running:

$ kubectl -n kube-system get secrets
NAME                  TYPE                                  DATA      AGE
linode          Opaque                                2         18h

Deploy the CSI

The following command will deploy the CSI driver with the related Kubernetes volume attachment, driver registration, and provisioning sidecars:

kubectl apply -f https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver.yaml

This deployment is a concatenation of all of the yaml files in pkg/linode-bs/deploy/kubernetes/.

Notably, this deployment will:

  • set the default storage class to linode-block-storage-retain Learn More

    This behavior can be modified in the csi-storageclass.yaml section of the deployment by toggling the storageclass.kubernetes.io/is-default-class annotation.

    $ kubectl get storageclasses
    NAME                             PROVISIONER               AGE
    linode-block-storage-retain (default)   linodebs.csi.linode.com   2d
    linode-block-storage                    linodebs.csi.linode.com   2d
  • use a reclaimPolicy of Retain Learn More

    Volumes created by this CSI driver will default to using the linode-block-storage-retain storage class if one is not specified. Upon deletion of all PersitentVolumeClaims, the PersistentVolume and its backing Block Storage Volume will remain intact.

  • assume that the Linode CCM is initialized and running Learn More

    If you absolutely intend to run this on a cluster which will not run the Linode CCM, you must modify the init container script located in the 08-cm-get-linode-id.yaml ConfigMap and delete the line that contains the exit 1.

Example Usage

This repository contains two manifests that demonstrate use of the Linode BlockStorage CSI. These manifests will create a PersistentVolume Claim using the linode-block-storage-retain storage class and then consume it in a minimal pod.

Once you have installed the Linode BlockStorage CSI, the following commands will run the example. Once you are finished with the example, please be sure to delete the pod, PVC, and the associated Block Storage Volume. The PVC created in this example uses the linode-block-storage-retain storage class, so you will need to remove the Block Storage Volume from your Linode account via the Cloud Manager or the Linode CLI.

kubectl create -f https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/examples/kubernetes/csi-pvc.yaml
kubectl create -f https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/examples/kubernetes/csi-app.yaml

Verify that the pod is running and can consume the volume:

kubectl get pvc/csi-example-pvc pods/csi-example-pod
kubectl describe pvc/csi-example-pvc pods/csi-example-pod | less

Now, let's add some data into the PVC, delete the POD, and recreate the pod. Our data will remain intact.

$ kubectl exec -it csi-example-pod -- /bin/sh -c "echo persistence > /data/example.txt; ls -l /data"
total 20
-rw-r--r--    1 root     root            12 Dec  5 13:06 example.txt
drwx------    2 root     root         16384 Dec  5 06:03 lost+found

$ kubectl delete pods/csi-example-pod
pod "csi-example-pod" deleted

$ kubectl create -f https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/examples/kubernetes/csi-app.yaml
pod/csi-example-pod created

$ sleep 30; kubectl exec -it csi-example-pod -- /bin/sh -c "ls -l /data; cat /data/example.txt"
total 20
-rw-r--r--    1 root     root            12 Dec  5 13:06 example.txt
drwx------    2 root     root         16384 Dec  5 06:03 lost+found
persistence

Disclaimers

  • Until this driver has reached v1.0.0 it may not maintain compatibility between driver versions
  • Requests for Persistent Volumes with a require_size less than the Linode minimum Block Storage size will be fulfilled with a Linode Block Storage volume of the minimum size (currently 10GiB), this is in accordance with the CSI specification. The upper-limit size constraint (limit_bytes) will also be honored so the size of Linode Block Storage volumes provisioned will not exceed this parameter.

Contribution Guidelines

Want to improve the linode-blockstorage-csi-driver? Please start here.

Join us on Slack

For general help or discussion, join the Kubernetes Slack channel #linode.

For development and debugging, join the Gopher's Slack channel #linodego.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].