Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (35 sloc) 1.75 KB

MySQL installation with cinder volume plugin

Cinder is a Block Storage service for OpenStack. This example shows how it can be used as an attachment mounted to a pod in Kubernetes.


Start kubelet with cloud provider as openstack with a valid cloud config Sample cloud_config:


Currently the cinder volume plugin is designed to work only on linux hosts and offers ext4 and ext3 as supported fs types Make sure that kubelet host machine has the following executables

/bin/lsblk -- To Find out the fstype of the volume
/sbin/mkfs.ext3 and /sbin/mkfs.ext4 -- To format the volume if required
/usr/bin/udevadm -- To probe the volume attached so that a symlink is created under /dev/disk/by-id/ with a virtio- prefix

Ensure cinder is installed and configured properly in the region in which kubelet is spun up


Create a cinder volume Ex:

cinder create --display-name=test-repo 2

Use the id of the cinder volume created to create a pod definition Create a new pod with the definition

cluster/ create -f examples/mysql-cinder-pd/mysql.yaml

This should now

  1. Attach the specified volume to the kubelet's host machine
  2. Format the volume if required (only if the volume specified is not already formatted to the fstype specified)
  3. Mount it on the kubelet's host machine
  4. Spin up a container with this volume mounted to the path specified in the pod definition


You can’t perform that action at this time.