From bd75c43430d27e0624ee8b10600ac349a0bc5058 Mon Sep 17 00:00:00 2001 From: Steve Leon Date: Tue, 24 Oct 2017 12:34:48 -0700 Subject: [PATCH] Adding documentation to configure flexvolume in coreos --- Documentation/k8s-pre-reqs.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/k8s-pre-reqs.md b/Documentation/k8s-pre-reqs.md index 2a9d09e63..f34db73a2 100644 --- a/Documentation/k8s-pre-reqs.md +++ b/Documentation/k8s-pre-reqs.md @@ -22,6 +22,37 @@ Creating the Rook operator requires privileges for setting up RBAC. To launch th -subj "/CN=admin/O=system:masters" ``` +## Flexvolume Configuration + +Rook uses [Flexvolume](https://github.com/kubernetes/community/blob/master/contributors/devel/flexvolume.md) to integrate with Kubernetes for performing storage operations. In some operating systems where Kubernetes is deployed, the [default Flexvolume plugin directory](https://github.com/kubernetes/community/blob/master/contributors/devel/flexvolume.md#prerequisites) (the directory where flexvolume drivers are installed) is **read-only**. + +This is the case for Kubernetes deployments on CoreOS and Rancher. +In these environments, the Kubelet needs to be told to use a different flexvolume plugin directory that is accessible and writeable. +To do this, you will need to first add the `--volume-plugin-dir` flag to the Kubelet and then restart the Kubelet process. +These steps need to be carried out on **all nodes** in your cluster. + +### CoreOS Container Linux + +In CoreOS, our recomendation is to specify the flag as shown below: + +```bash +--volume-plugin-dir=/var/lib/kubelet/volumeplugins +``` + +Restart Kubelet in order for this change to take effect. + +### Rancher + +Rancher provides an easy way to configure Kubelet. This flag can be provided to the Kubelet configuration template at deployment time or by using the `up to date` feature if Kubernetes is already deployed. + +To configure Flexvolume in Rancher, specify this Kubelet flag as shown below: + +```bash +--volume-plugin-dir=/var/lib/kubelet/volumeplugins +``` + +Restart Kubelet in order for this change to take effect. + ## Minikube To install `minikube`, refer to this [page](https://github.com/kubernetes/minikube/releases). Once you have `minikube` installed, start a cluster by doing the following: