Where does k3s store it's "/var/lib/kubelet/config.yaml" file?



  • Referencing another https://stackoverflow.com/a/54443743/124486 , they suggest setting

    evictionHard:
      imagefs.available: 1%
      memory.available: 100Mi
      nodefs.available: 1%
      nodefs.inodesFree: 1%
    

    In the file /var/lib/kubelet/config.yaml. However, I do not see that file in my k3s distribution of kubernetes. Where is this file located with k3s?



  • /etc/rancher/k3s/config.yaml

    Note, /etc/rancher/k3s/config.yaml not /etc/rancher/k3s/k3s.yaml! You may have to create the file if it doesn't exist.

    https://github.com/k3s-io/k3s/issues/5213#issuecomment-1061135298 So it's https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#customized-flags-for-kubernetes-processes to k3s. But you can https://github.com/k3s-io/k3s/issues/5488#issuecomment-1106227357 ,

    kubelet-arg:
      - "kube-reserved=cpu=500m,memory=1Gi,ephemeral-storage=2Gi"
      - "system-reserved=cpu=500m, memory=1Gi,ephemeral-storage=2Gi"
      - "eviction-hard=memory.available

    Which would look like,

    kubelet-arg:
      - "eviction-hard=imagefs.available,memory.available,nodefs.available,nodefs.inodesFree"
    

    You can find more information at,

    • https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#customized-flags-for-kubernetes-processes
    • https://rancher.com/docs/k3s/latest/en/installation/install-options/#configuration-file


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2