<p>I want to deploy rook for kubernetes. I use 1 master and 3 worker and the host is ubuntu in baremetal. but the container stuck in creating container. after a lot of search i understand i should use this document <a href="https://github.com/rook/rook/blob/master/Documentation/flexvolume.md#most-common-readwrite-flexvolume-path" rel="nofollow noreferrer">https://github.com/rook/rook/blob/master/Documentation/flexvolume.md#most-common-readwrite-flexvolume-path</a> that said</p>

<blockquote>
  <p>Configuring the Rook operator You must provide the above found
  FlexVolume path when deploying the rook-operator by setting the
  environment variable FLEXVOLUME_DIR_PATH. For example:</p>
  
  <p>env: [...]
  - name: FLEXVOLUME_DIR_PATH   value: "/var/lib/kubelet/volumeplugins" (In the operator.yaml manifest replace  with the
  path or if you use helm set the agent.flexVolumeDirPath to the
  FlexVolume path)</p>
  
  <p>Configuring the Kubernetes kubelet You need to add the flexvolume flag
  with the path to all nodes's kubelet in the Kubernetes cluster:</p>
  
  <p>--volume-plugin-dir=PATH_TO_FLEXVOLUME (Where the PATH_TO_FLEXVOLUME is the above found FlexVolume path)</p>
</blockquote>

<p>the question is how can i add  flexvolume flag with the path to all nodes's kubelet ?</p>

yasin lachini
<p>@yasin lachini,<br>
If you deploy kubernetes cluster on baremetal, you don't need to configure anything. That is because /usr/libexec/kubernetes/kubelet-plugins/volume/exec/ is the kubelet default FlexVolume path and Rook assumes the default FlexVolume path if not set differently.</p>

<p>My env:<br>
rook-ceph/operator.yml (use default FLEXVOLUME_DIR_PATH) :</p>

<pre><code>...
        # Set the path where the Rook agent can find the flex volumes
        # - name: FLEXVOLUME_DIR_PATH
        #   value: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec"
...
</code></pre>

<p>After deploy,on node:  </p>

<pre><code># ls /usr/libexec/kubernetes/kubelet-plugins/volume/exec/
ceph.rook.io~rook  ceph.rook.io~rook-ceph-system  rook.io~rook  rook.io~rook-ceph-system
</code></pre>
