<p>I'm reading the <a href="https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/" rel="nofollow noreferrer">Reserve Compute Resources for System Daemons</a> task in Kubernetes docs and it briefly explains how to allocate a compute resource to a node using <code>kubelet</code> command and flags <code>--kube-reserved</code>, <code>--system-reserved</code> and <code>--eviction-hard</code>.</p>

<p>I'm learning on <a href="https://minikube.sigs.k8s.io/docs/start/macos/" rel="nofollow noreferrer">Minikube for masOS</a> and as far as I got, minikube is configured to use command <code>kubectl</code> along with <code>minikube</code> command.</p>

<p>For local learning purposes on minikube I don't need to have it set (<em>maybe it can't be done on minikube)</em> but </p>

<p><strong>How this could be done let's say in K8's development environment on a node?</strong></p>

Dominik Krulak
<p>This could be be done by:</p>

<p><strong>1</strong>. Passing <code>config</code> file during cluster initialization or initilize <code>kubelet</code> with additional parameters via <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/" rel="nofollow noreferrer">config file</a>, </p>

<p>For cluster initialization using config file <a href="https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1#hdr-Basics" rel="nofollow noreferrer">it should contains at least</a>:</p>

<pre><code>kind: InitConfiguration
kind: ClusterConfiguration
   additional configuratuion types like:
kind: KubeletConfiguration
</code></pre>

<p>In order to get basic config file you can use <code>kubeadm config print init-defaults</code></p>

<p><strong>2</strong>. For the live cluster please consider reconfigure current cluster using steps "<strong>Generate the configuration file</strong>" and "<strong>Push the configuration file to the control plane</strong>" like described in <a href="https://kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/" rel="nofollow noreferrer">"Reconfigure a Node's Kubelet in a Live Cluster"</a></p>

<p><strong>3</strong>. I didn't test it but for <code>minikube</code> - please take a look <a href="https://kubernetes.io/docs/setup/learning-environment/minikube/#configuring-kubernetes" rel="nofollow noreferrer">here</a>: </p>

<p>Note:</p>

<blockquote>
  <p>Minikube has a “configurator” feature that allows users to configure the Kubernetes components with arbitrary values. To use this feature, you can use the --extra-config flag on the minikube start command.</p>
  
  <p>This flag is repeated, so you can pass it several times with several different values to set multiple options.</p>
  
  <p>This flag takes a string of the form component.key=value, where component is one of the strings from the below list, key is a value on the configuration struct and value is the value to set.</p>
  
  <p>Valid keys can be found by examining the documentation for the Kubernetes componentconfigs for each component. Here is the documentation for each supported configuration:</p>

<pre><code>kubelet
apiserver
proxy
controller-manager
etcd
scheduler
</code></pre>
</blockquote>

<p>Hope this helped:</p>

<p>Additional community resources:</p>

<p><a href="https://stackoverflow.com/questions/56486023/does-kubernetes-consider-the-current-memory-usage-when-scheduling-pods/56799354#56799354">Memory usage in kubernetes cluster</a> </p>
