|
1 | | -# MySQL installation with cinder volume plugin |
2 | | - |
3 | | -Cinder is a Block Storage service for OpenStack. This example shows how it can be used as an attachment mounted to a pod in Kubernets. |
4 | | - |
5 | | -### Prerequisites |
6 | | - |
7 | | -Start kubelet with cloud provider as openstack with a valid cloud config |
8 | | -Sample cloud_config: |
9 | | - |
10 | | -``` |
11 | | -[Global] |
12 | | -auth-url=https://os-identity.vip.foo.bar.com:5443/v2.0 |
13 | | -username=user |
14 | | -password=pass |
15 | | -region=region1 |
16 | | -tenant-id=0c331a1df18571594d49fe68asa4e |
17 | | -``` |
18 | | - |
19 | | -Currently the cinder volume plugin is designed to work only on linux hosts and offers ext4 and ext3 as supported fs types |
20 | | -Make sure that kubelet host machine has the following executables |
21 | | - |
22 | | -``` |
23 | | -/bin/lsblk -- To Find out the fstype of the volume |
24 | | -/sbin/mkfs.ext3 and /sbin/mkfs.ext4 -- To format the volume if required |
25 | | -/usr/bin/udevadm -- To probe the volume attached so that a symlink is created under /dev/disk/by-id/ with a virtio- prefix |
26 | | -``` |
27 | | - |
28 | | -Ensure cinder is installed and configured properly in the region in which kubelet is spun up |
29 | | - |
30 | | -### Example |
31 | | - |
32 | | -Create a cinder volume Ex: |
33 | | - |
34 | | -`cinder create --display-name=test-repo 2` |
35 | | - |
36 | | -Use the id of the cinder volume created to create a pod [definition](mysql.yaml) |
37 | | -Create a new pod with the definition |
38 | | - |
39 | | -`cluster/kubectl.sh create -f examples/mysql-cinder-pd/mysql.yaml` |
40 | | - |
41 | | -This should now |
42 | | - |
43 | | -1. Attach the specified volume to the kubelet's host machine |
44 | | -2. Format the volume if required (only if the volume specified is not already formatted to the fstype specified) |
45 | | -3. Mount it on the kubelet's host machine |
46 | | -4. Spin up a container with this volume mounted to the path specified in the pod definition |
47 | | - |
48 | | - |
49 | | -<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> |
50 | | -[]() |
51 | | -<!-- END MUNGE: GENERATED_ANALYTICS --> |
| 1 | +This file has moved to [https://github.com/kubernetes/examples/blob/master/staging/mysql-cinder-pd/README.md](https://github.com/kubernetes/examples/blob/master/staging/mysql-cinder-pd/README.md) |
0 commit comments