Because I have modified the source codes of k8s and want to debug the k8s, I would like to build and install kubelet, kubectl, kubeadm from source codes. Now I have built the kubelet, kubectl, kubeadm
and get the bin files. When I want to run kubedam
to deploy a cluster, I found just copying them to /usr/local/bin/
does not work for me and I got the following errors:
kubeadm init --apiserver-advertise-address=x.x.x.x --pod-network-cidr=10.244.0.0/16
W0204 20:55:28.785179 5682 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[init] Using Kubernetes version: v1.17.2
[preflight] Running pre-flight checks
[WARNING Service-Kubelet]: kubelet service does not exist
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR FileExisting-conntrack]: conntrack not found in system path
[ERROR KubeletVersion]: the kubelet version is higher than the control plane version. This is not a supported version skew and may lead to a malfunctional cluster. Kubelet version: "1.18.0-alpha.2.355+845b23232125ca" Control plane version: "1.17.2"
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
Could anyone help me about how to install kubelet, kubectl, kubeadm
correctly from source codes?
Thank you very much.