Git Product home page Git Product logo

csi-driver-image-populator's Introduction

csi-driver-image-populator

CSI driver that uses a container image as a volume.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

How it works:

Currently the driver makes use of buildah to download the container image if it is not already available, launch a new instance of it named after the volumeHandle, and mount it.

In the future, integration with CRI would be desirable so the driver could ask via CRI that the Container Runtime perform these activities in a generic way.

Usage:

This is a prototype driver. Do not use for production

It also requires features that are still in development.

Build imageplugin

$ make image

Installing into Kubernetes

deploy/deploy-image.sh

Example Usage in Kubernetes

apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - name: nginx
    image: nginx:1.13-alpine
    ports:
    - containerPort: 80
    volumeMount:
    - name: data
      mountPath: /usr/share/nginx/html
  volumes:
  - name: data
    csi:
      driver: image.csi.k8s.io
      volumeAttributes:
          image: kfox1111/misc:test

Start Image driver manually

$ sudo ./bin/imageplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5

Test using csc

Get csc tool from https://github.com/rexray/gocsi/tree/master/csc

Mount the image

$ csc -e tcp://127.0.0.1:10000 node publish abcdefg --attrib image=kfox1111/misc:test --cap MULTI_NODE_MULTI_WRITER,block --target-path /tmp/csi

Unmount the image

$ csc -e tcp://127.0.0.1:10000 node unpublish abcdefg --target-path /tmp/csi

csi-driver-image-populator's People

Contributors

jsafrane avatar k8s-ci-robot avatar kfox1111 avatar msau42 avatar nikhita avatar pohly avatar spiffxp 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.