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?
Check this question. Kubernetes has configuration(--cloud-config
paramter) on how to connect cloud provider like OpenStack to operate Load Balance IP & Block Storage.
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
andkubernetes.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.