<p>I am modifying the source code of the <code>kubelet</code>.
For compiling, I can do <code>make quick-release</code>. And I can get the executable <code>kubelet</code> from the <code>_output</code></p>

<p>Then I replace the original <code>/usr/bin/kubelet</code> with the new executable, but when I run <code>kubeadm init</code>, it gives me the error message:</p>

<p><code>
[preflight] Some fatal errors occurred:
    [ERROR KubeletVersion]: couldn't get kubelet version: Unable to parse output from Kubelet: "Kubernetes v0.0.0-master+$Format:%h$"
</code></p>

<p>I believe there must be a standard way to compile and deploy Kubernetes. My googled resource are mostly about developing application on Kubernetes. Can anyone give me a guide or give some keywords so I can google on my own?</p>

<p>Thanks</p>

<p>--</p>

<p>Update</p>

<p>I replaced the <code>kubelet</code> in <code>minikube</code> env.</p>

<p>And I got the permission error.</p>

<p><code>W0613 16:34:55.917805   26616 status_manager.go:496] Failed to update status for pod "kube-apiserver-minikube_kube-system(5ff9a836-6f27-11e8-8667-080027c176b2)": failed to patch status "{\"status\":{\"$setElementOrder/conditions\":[{\"type\":\"Initialized\"},{\"type\":\"Ready\"},{\"type\":\"PodScheduled\"}],\"conditions\":[{\"lastTransitionTime\":\"2018-06-13T16:34:51Z\",\"status\":\"True\",\"type\":\"Ready\"}]}}" for pod "kube-system"/"kube-apiserver-minikube": pods "kube-apiserver-minikube" is forbidden: User "system:node:minikube" cannot patch pods/status in the namespace "kube-system"
</code></p>

<p>--</p>

<p>Update again</p>

<p>I found that it's the version inconsistent problem.
Once I checkout the same version of the Kubernete in minikube <code>git checkout v1.10.0</code>, then the problem is solved.</p>

chinuy
<p>try </p>

<pre><code>cd $GOPATH/src/k8s.io/kubernetes
make clean
# use the version you used, like v1.9.2-123
git tag v1.x.x-xxxx
make kubelet
# should show the above tag
_output/bin/kubelet --version
</code></pre>

<p>If you just modified source code of a single component, you doesn't need to <code>make quick-release</code>, just <code>make &lt;componenet_name&gt;</code> (for example, <code>make kubelet</code>,<code>make kube-proxy</code>...). And you just need to tag once (the tag should be there after new changes made to the source code).     </p>
