Answers: <h1><code>/etc/rancher/k3s/config.yaml</code></h1>
  <p><strong><em>Note, <code>/etc/rancher/k3s/config.yaml</code> not <code>/etc/rancher/k3s/k3s.yaml</code>! You may have to create the file if it doesn't exist.</em></strong></p>
  <p><a href="https://github.com/k3s-io/k3s/issues/5213#issuecomment-1061135298" rel="noreferrer">K3s doesn't have a dedicated kubelet service. It's integrated into k3s.</a> So it's <a href="https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#customized-flags-for-kubernetes-processes" rel="noreferrer">configured only with the <code>--kubelet-arg</code> flag</a> to k3s. But you can <a href="https://github.com/k3s-io/k3s/issues/5488#issuecomment-1106227357" rel="noreferrer">add Kubelet config directives to your <code>config.yaml</code> (<code>/etc/rancher/k3s/config.yaml</code>)</a>,</p>
  <pre class="lang-yaml prettyprint-override"><code>kubelet-arg:
    - &quot;kube-reserved=cpu=500m,memory=1Gi,ephemeral-storage=2Gi&quot;
    - &quot;system-reserved=cpu=500m, memory=1Gi,ephemeral-storage=2Gi&quot;
    - &quot;eviction-hard=memory.available&lt;500Mi,nodefs.available&lt;10%&quot;
  </code></pre>
  <p>Which would look like,</p>
  <pre><code>kubelet-arg:
    - &quot;eviction-hard=imagefs.available&lt;case&gt;,memory.available&lt;case&gt;,nodefs.available&lt;case&gt;,nodefs.inodesFree&lt;case&gt;&quot;
  </code></pre>
  <p>You can find more information at,</p>
  <ul>
  <li><a href="https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#customized-flags-for-kubernetes-processes" rel="noreferrer"><em>&quot;Customized Flags for Kubernetes Processes&quot;</em></a></li>
  <li><a href="https://rancher.com/docs/k3s/latest/en/installation/install-options/#configuration-file" rel="noreferrer"><em>&quot;K3S Configuration File&quot;</em></a></li>
  </ul>
  
Answers: CC BY-SA 4.0
Answers: 2022-06-06T18:07:09.407Z
Answers: 2022-06-07T15:33:39.953Z
Answers: 2022-06-07T15:33:39.953Z
Answers: Evan Carroll
Body: <p>Referencing another <a href="https://stackoverflow.com/a/54443743/124486">answer here</a>, they suggest setting</p>
  <pre><code>evictionHard:
    imagefs.available: 1%
    memory.available: 100Mi
    nodefs.available: 1%
    nodefs.inodesFree: 1%
  </code></pre>
  <p>In the file <code>/var/lib/kubelet/config.yaml</code>. However, I do not see that file in my k3s distribution of kubernetes. Where is this file located with k3s?</p>
  
Tags: <configuration><k3s><kubelet>
Title: Where does k3s store it's "/var/lib/kubelet/config.yaml" file?
UserDisplayName: Evan Carroll
ThreadText: # Where does k3s store it's "/var/lib/kubelet/config.yaml" file?
  
  (Asked by: username_0 on 2022-06-04)
  
  Referencing another [answer here](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?
  
  **Tags:** configuration, k3s, kubelet
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-06-06. Score: 6 | Accepted answer
  
  # `/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.***
  
  [K3s doesn't have a dedicated kubelet service. It's integrated into k3s.](https://github.com/k3s-io/k3s/issues/5213#issuecomment-1061135298) So it's [configured only with the `--kubelet-arg` flag](https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#customized-flags-for-kubernetes-processes) to k3s. But you can [add Kubelet config directives to your `config.yaml` (`/etc/rancher/k3s/config.yaml`)](https://github.com/k3s-io/k3s/issues/5488#issuecomment-1106227357),
  
  ```yaml
  kubelet-arg:
    - "kube-reserved=cpu=500m,memory=1Gi,ephemeral-storage=2Gi"
    - "system-reserved=cpu=500m, memory=1Gi,ephemeral-storage=2Gi"
    - "eviction-hard=memory.available<500Mi,nodefs.available<10%"
  
  ```
  
  Which would look like,
  
  ```
  kubelet-arg:
    - "eviction-hard=imagefs.available<case>,memory.available<case>,nodefs.available<case>,nodefs.inodesFree<case>"
  
  ```
  
  You can find more information at,
  
  * [*"Customized Flags for Kubernetes Processes"*](https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#customized-flags-for-kubernetes-processes)
  * [*"K3S Configuration File"*](https://rancher.com/docs/k3s/latest/en/installation/install-options/#configuration-file)
  
  
  ---
  
  