简体   繁体   中英

Kubernetes Custom Volume Plugin with Dynamic Provisioning

I have a proprietary file-system and I would like to use it for providing file storage to my K8S pods. I am currently running K8S v1.5.1, but open upgrade to 1.6 if need be.

I would like to make use of Dynamic Provisioning so that the volumes are created on need basis. I went through the official documentation on kubernetes.io and this is what I have understood so far:

  1. I need to write a Kubernetes Custom volume-plugin for my proprietary file-system.
  2. I need to create a StorageClass which makes use of a provisoner that provisions volumes from my proprietary filesystem
  3. I then create a PVC that refers to my StorageClass
  4. I then create my Pods referring to my storage class by name.

What I am not able to make out is:

  1. Is Provisoner referred by Storage Class and K8S Volume Plugin one and the same? If they are different, how?
  2. There is mention of External Provisoner in K8S documentation . Does this mean I can write the K8S Volume Plugin for my filesystem out-of-tree (outside K8S code)?
  3. My filesystem provides REST APIs to create filesystem volumes. Can I invoke them in my provisoner/volume plugin?
  4. If I write an out-of-tree plugin, how do I load it in my K8S cluster so that it can be used to provision volumes using the Storage Class?

Appreciate any help in answering any or all of the above.

Thanks!

Is Provisoner referred by Storage Class and K8S Volume Plugin one and the same? If they are different, how? It should be same if you want to provision the storage using that plugin.

There is mention of External Provisoner in K8S documentation. Does this mean I can write the K8S Volume Plugin for my filesystem out-of-tree (outside K8S code)? Yes, thats correct.

My filesystem provides REST APIs to create filesystem volumes. Can I invoke them in my provisoner/volume plugin?

Yes, as long as the client is part of the provisioner code.

If I write an out-of-tree plugin, how do I load it in my K8S cluster so that it can be used to provision volumes using the Storage Class?

It can run as a container or you can invoke it by a binary execution model.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM