1

I'm new to k8s, and recently, I read the cinder volume plugin source code: cinder volume plugin.

I don't know how the plugin works, and how it communicates with cinder? And I don't find the request and response in code.

Does the cinder volume plugin call cinder API or other ways?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Lance.yang
  • 11
  • 3

2 Answers2

1

cinder volume is a persistent volume, more precisely one of the persistent volume storage classes.

Each StorageClass contains the fields provisioner and parameters, which are used when a PersistentVolume belonging to the class needs to be dynamically provisioned.

Cinder specifically is an Openstack volume type.
It is an OpenStack Block Storage Cinder, which:

  • implements services and libraries to provide on demand, self-service access to Block Storage resources.
  • Provides Software Defined Block Storage via abstraction and automation on top of various traditional backend block storage devices.

You can see how Kubernetes uses cinder in pkg/volume/cinder/cinder_test.go.
However, as mentioned in "Kubernetes Cinder volumes do not mount with cloud-provider=openstack":

the the Cinder provisioner is not implemented yet, given the following statement in the docs (StorageClasses Provisioner):

During beta, the available provisioner types are kubernetes.io/aws-ebs and kubernetes.io/gce-pd

So no "kubernetes.io/cinder" yet.
Yet, Ewa mentions in the comments making it work: see "Kubernetes Cinder volumes do not mount with cloud-provider=openstack" as an example.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • eh,I've not run a cinder example,I just read the source code. can you tell me how the plugin works? and how it communicate with cinder? I'm very confused. thanks a lot!!! – Lance.yang Jan 15 '17 at 08:19
  • @Lance.yang Exactly. My point is, should you try to run a cinder example, it might not work from kubernetes – VonC Jan 15 '17 at 08:21
  • I don't know how the cinder volume plugin works, but I want you to know that it works. For sure in Kubernetes 1.5.3, both dynamic and static way. – Ewa Mar 08 '17 at 11:31
  • @Ewa Thank you. I have included your comment in the answer for more visibility (with a link to your recent answer) – VonC Mar 08 '17 at 11:40
0

Check this question. Kubernetes has configuration(--cloud-config paramter) on how to connect cloud provider like OpenStack to operate Load Balance IP & Block Storage.

fkpwolf
  • 373
  • 4
  • 13