<p>I want to customize the arguments to kube-apiserver so that I can inspect the requests being made, so that I can debug a failing request. However, I'm not sure what I need to modify. I know that kube-apiserver can't be being deployed with helm, because helm requires an API server in order to do its job. So it must be being deployed via some other bootstrapping method, but looking at the kind source code I can't figure out what that method is.</p>

Robin Green
<p>The kube-apiserver is configured with a static manifest file, which is stored in <code>/etc/kubernetes/manifests/kube-apiserver.yaml</code>.</p>

<p>So find out the ID of the container that is the Kubernetes control plane node in kind:</p>

<pre><code>docker ps|grep cluster-control-plane
</code></pre>

<p>Get a shell in it:</p>

<pre><code>docker exec -it 4aeedccce928 bash
</code></pre>

<p>Install an editor (e.g. emacs) and edit the aforementioned file to add/remove/replace <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/" rel="nofollow noreferrer">the desired arguments</a>:</p>

<pre><code>apt-get update
apt-get install emacs-nox
emacs /etc/kubernetes/manifests/kube-apiserver.yaml
</code></pre>

<p>Kubernetes will detect the file change and automatically restart the server, which can be validated with:</p>

<pre><code>ps -Afl|grep kube-apiserver
</code></pre>

<p>If it crashes on startup, you can find the logs using</p>

<pre><code>apt-get install less
less /var/log/pods/kube-system_kube-apiserver-cluster-control-plane_*/*/*.log
</code></pre>

<p>If the container fails to start at all, there will not be any log file there - check the manifest file for syntax errors by referring to the Kubernetes documentation.</p>
