How to pass --pod-manifest-path to the kubelet quickly, without creating a new configuration file?

12/1/2018

Running kubelet --pod-manifest-path=/newdir returns errors.

It's not clear to me where I can add the --pod-manifest-path to a systemd file on Ubuntu. I know for v1.12 there is the KubeletConfiguration type but I am using v1.11.

-- R678
kubeconfig
kubernetes

1 Answer

12/3/2018

You can find in documentation:

  1. Configure your kubelet daemon on the node to use this directory by running it with --pod-manifest-path=/etc/kubelet.d/ argument. On Fedora edit /etc/kubernetes/kubelet to include this line:

    KUBELET_ARGS="--cluster-dns=10.254.0.10 --cluster-domain=kube.local --pod-manifest-path=/etc/kubelet.d/"

    Instructions for other distributions or Kubernetes installations may vary.

  2. Restart kubelet. On Fedora, this is:

    [root@my-node1 ~] $ systemctl restart kubelet

If you want to use --pod-manifest-path you can define it in Kubelet configuration.

Usually it is stored /etc/kubernetes/kubelet or /etc/default/kubelet or /etc/systemd/system/kubelet.service

-- Nick Rak
Source: StackOverflow