Code Monkey home page Code Monkey logo

blobfuse-csi-driver's Introduction

blobfuse CSI driver for Kubernetes

TravisCI Coverage Status FOSSA Status

About

This driver allows Kubernetes to use azure-storage-fuse, csi plugin name: blobfuse.csi.azure.com

Project Status

Status: Aplha

Container Images & CSI Compatibility:

Blobfuse CSI Driver Version Image v1.0.0
v0.1.0-alpha mcr.microsoft.com/k8s/csi/blobfuse-csi:v0.1.0-alpha yes
master branch mcr.microsoft.com/k8s/csi/blobfuse-csi:latest yes

Kubernetes Compatibility

Blobfuse CSI Driver\Kubernetes Version 1.13+
v0.1.0-alpha yes
master branch yes

Driver parameters

Please refer to blobfuse.csi.azure.com driver parameters

storage class blobfuse.csi.azure.com parameters are compatible with built-in blobfuse plugin

Prerequisite

if cluster is based on Managed Service Identity(MSI), make sure all agent nodes have Contributor role for current resource group

Install blobfuse CSI driver on a kubernetes cluster

Please refer to install blobfuse csi driver

E2E Usage example

create a pod with blobfuse mount on linux

Dynamic Provisioning (create storage account and container automatically by blobfuse driver)

  • Create a blobfuse CSI storage class
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/storageclass-blobfuse-csi-mountoptions.yaml
  • Create a blobfuse CSI PVC
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pvc-blobfuse-csi.yaml

Static Provisioning(use an existing storage account)

Option#1: use existing credentials in k8s cluster

make sure the existing credentials in k8s cluster(e.g. service principal, msi) could access the specified storage account

  • Download a blobfuse CSI storage class, edit resourceGroup, storageAccount, containerName in storage class
wget https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/storageclass-blobfuse-csi-existing-container.yaml
vi storageclass-blobfuse-csi-existing-container.yaml
kubectl create -f storageclass-blobfuse-csi-existing-container.yaml
  • Create a blobfuse CSI PVC
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pvc-blobfuse-csi.yaml

Option#2: provide storage account name and key

  • Use kubectl create secret to create azure-secret with existing storage account name and key
kubectl create secret generic azure-secret --from-literal accountname=NAME --from-literal accountkey="KEY" --type=Opaque
  • Create a blobfuse CSI PV, download pv-blobfuse-csi.yaml file and edit containerName in volumeAttributes
wget https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pv-blobfuse-csi.yaml
vi pv-blobfuse-csi.yaml
kubectl create -f pv-blobfuse-csi.yaml
  • Create a blobfuse CSI PVC which would be bound to the above PV
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/pvc-blobfuse-csi-static.yaml

2. Validate PVC status and create an nginx pod

make sure pvc is created and in Bound status

watch kubectl describe pvc pvc-blobfuse
  • create a pod with blobfuse CSI PVC
kubectl create -f https://raw.githubusercontent.com/csi-driver/blobfuse-csi-driver/master/deploy/example/nginx-pod-blobfuse.yaml

3. enter the pod container to do validation

  • watch the status of pod until its Status changed from Pending to Running and then enter the pod container
$ watch kubectl describe po nginx-blobfuse
$ kubectl exec -it nginx-blobfuse -- bash
Filesystem      Size  Used Avail Use% Mounted on
...
blobfuse         30G  8.9G   21G  31% /mnt/blobfuse
/dev/sda1        30G  8.9G   21G  31% /etc/hosts
...

In the above example, there is a /mnt/blobfuse directory mounted as dysk filesystem.

Kubernetes Development

Please refer to development guide

Links

blobfuse-csi-driver's People

Contributors

andyzhangx avatar ashishranjan738 avatar lizebang avatar rui-tang avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.