如何将标记添加到kubelet

问题描述:

我想为kubernetes部署菜鸟.我使用1个主机和3个工人,并且主机是ubuntu裸机.但是容器卡在了创建容器中.经过大量搜索后,我了解到我应该使用此文档 https://github.com/rook/rook/blob/master/Documentation/flexvolume.md#most-common-readwrite-flexvolume-path

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 https://github.com/rook/rook/blob/master/Documentation/flexvolume.md#most-common-readwrite-flexvolume-path that said

配置Rook运算符您必须提供找到的以上内容 通过设置 环境变量FLEXVOLUME_DIR_PATH.例如:

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:

env:[...] -名称:FLEXVOLUME_DIR_PATH值:"/var/lib/kubelet/volumeplugins"(在operator.yaml清单中替换为 路径,或者如果您使用掌舵,请将agent.flexVolumeDirPath设置为 FlexVolume路径)

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)

配置Kubernetes kubelet您需要添加flexvolume标志 以及Kubernetes集群中所有节点的kubelet的路径:

Configuring the Kubernetes kubelet You need to add the flexvolume flag with the path to all nodes's kubelet in the Kubernetes cluster:

-volume-plugin-dir = PATH_TO_FLEXVOLUME(其中PATH_TO_FLEXVOLUME是上面找到的FlexVolume路径)

--volume-plugin-dir=PATH_TO_FLEXVOLUME (Where the PATH_TO_FLEXVOLUME is the above found FlexVolume path)

问题是如何在所有节点的kubelet的路径中添加flexvolume标志?

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

@yasin lachini,
如果您在裸机上部署kubernetes集群,则无需配置任何内容.这是因为/usr/libexec/kubernetes/kubelet-plugins/volume/exec/是kubelet的默认FlexVolume路径,而Rook假定默认的FlexVolume路径(如果未进行其他设置).

@yasin lachini,
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.

我的环境:
rook-ceph/operator.yml(使用默认的FLEXVOLUME_DIR_PATH):

My env:
rook-ceph/operator.yml (use default FLEXVOLUME_DIR_PATH) :

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

部署后,在节点上:

# 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