<p>I'm new to k8s, and recently, I read the cinder volume plugin source code:
<a href="https://github.com/kubernetes/kubernetes/tree/master/pkg/volume/cinder" rel="nofollow noreferrer">cinder volume plugin</a>.</p>

<p>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.</p>

<p>Does the cinder volume plugin call cinder API or other ways?</p>

<p>cinder volume is a <a href="https://kubernetes.io/docs/user-guide/persistent-volumes/" rel="nofollow noreferrer">persistent volume</a>, more precisely one of the persistent volume <a href="https://kubernetes.io/docs/user-guide/persistent-volumes/#storageclasses" rel="nofollow noreferrer">storage classes</a>.</p>

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

<p>Cinder specifically is an <a href="http://docs.openstack.org/admin-guide/dashboard-manage-volumes.html" rel="nofollow noreferrer">Openstack volume type</a>.<br>
It is an <a href="https://wiki.openstack.org/wiki/Cinder" rel="nofollow noreferrer">OpenStack Block Storage Cinder</a>, which:</p>

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

<p>You can see how Kubernetes uses cinder in <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/cinder/cinder_test.go" rel="nofollow noreferrer"><code>pkg/volume/cinder/cinder_test.go</code></a>.<br>
However, as mentioned in "<a href="https://stackoverflow.com/a/40841681/6309">Kubernetes Cinder volumes do not mount with cloud-provider=openstack</a>":</p>

<blockquote>
  <p>the the Cinder provisioner is not implemented yet, given the following statement in the docs (<a href="http://kubernetes.io/docs/user-guide/persistent-volumes/#provisioner" rel="nofollow noreferrer">StorageClasses Provisioner</a>):</p>
  
  <blockquote>
    <p>During beta, the available provisioner types are <code>kubernetes.io/aws-ebs</code> and <code>kubernetes.io/gce-pd</code></p>
  </blockquote>
</blockquote>

<p>So no "<code>kubernetes.io/cinder</code>" yet.<br>
Yet, <a href="https://stackoverflow.com/users/4457564/ewa">Ewa</a> mentions <a href="https://stackoverflow.com/questions/41658969/how-the-kubernetes-cinder-volume-plugin-works/41659037?noredirect=1#comment72464885_41659037">in the comments</a> making it work: see "<a href="https://stackoverflow.com/a/42670021/6309">Kubernetes Cinder volumes do not mount with <code>cloud-provider=openstack</code></a>" as an example.</p>
