Git Product home page Git Product logo

k8s-host-device-plugin's Introduction

k8s-host-device-plugin

This is a very thin device plugin which just exposing device files in host to containers.

Those device files are assumed to be non limited resources, things like "capabilitites" of a host (i.e. /dev/kvm).

However, due to kubernetes/kubernetes#59380, current device plugin(v1beta1) doesn't support unlimited extended resources. Currently a hack would be to set the number of resources advertised by the device plugin to a very high mumber.

Versioning(Tag) Convention

$KUBEERNETES_VERSION-K8S_HOST_DEVICE_PLUGIN_VERSION

How to

see example folder.

cd example

# create configmap with key=`config.json`, value=config json
# this config
#   - resource name: github.com/everpeace-random
#   - host device file: /dev/random
#   - container path to be mounted: /dev/everpeace-mount
#   - permission: "r"
#   - number of devices:  100  # please make this value sufficiently large,
#                              # in this case, capacity is `github.com/everpeace-random: 100`
kubectl create -f host-devices.yaml

# deploy device plugin
kubectl create -f host-device-plugin.yaml

# create test pod
# this requests 10 everpeace-random resources. (10 is meaningless.)
kubectl create -f test-pod.yaml

Practical example

If you wanted to expose infiniband devices, please look into ib-example directory

Release Notes

1.10.1-0.0.1

first release

1.11.0-0.0.1

just bump k8s version for 0.0.1

1.11.1-0.0.1

just bump k8s version for 0.0.1

1.11.1-0.0.2

support checking device existence #3

1.21.3-0.1.0

  • support light-weight glob support #8
  • upgrade kubernetes version to 1.21.3 #7
  • make it go module #6
  • Send only changes of health #4

k8s-host-device-plugin's People

Contributors

dtaniwaki avatar everpeace avatar

Watchers

 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.