How the kubernetes cinder volume plugin works?

1/15/2017

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?

-- Lance.yang
docker-volume
go
kubernetes
openstack
openstack-cinder

2 Answers

7/24/2018

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
Source: StackOverflow

1/15/2017

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.

-- VonC
Source: StackOverflow