How to add flag to kubelet

前端 未结 2 926
不思量自难忘°
不思量自难忘° 2021-01-27 00:04

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 und

2条回答
  •  忘掉有多难
    2021-01-27 00:18

    There are two options.

    I. set

    KUBELET_EXTRA_ARGS=--FLEXVOLUME_DIR_PATH=/var/lib/kubelet/volumeplugins
    

    within the file

    /etc/default/kubelet
    

    And restart kubelete service

    sudo systemctl restart kubelet
    

    II. You can set kubelet parameters via a config file.

    For example:

    kind: KubeletConfiguration
    apiVersion: kubelet.config.k8s.io/v1beta1
    env:
    - name: FLEXVOLUME_DIR_PATH
      value: "/var/lib/kubelet/volumeplugins"
    

    Then, you just start the Kubelet with the --config flag set to the path of the Kubelet’s config file

    sudo kubelet --config=/etc/default/kubelet/custom-conf.config
    

    https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/

提交回复
热议问题