Running K8s cluster after source code compilation

3/28/2019

I am attempting to compile K8s source code from git hub and use freshly compiled binaries to deploy k8s cluster. i have 1 master (x215) + 1 minion node (x216) as my test cluster.

i have forked the main repo to my private repo on github and cloned it to x215

git clone https://github.com/xxxx/kubernetes
make quick realease

compilation was success as i don`t see any errors on logs i am getting at std out

now I figured that compiled binaries are in _output/release-stage/server/linux-amd64/kubernetes/server/bin

How do i use these binaries to deploy K8s master services on x215 and minion services on x216 node.

*** Update :

  1. I have tried installing K8s by yum install kubeadm kubelet kubectl as shown on this link. https://www.howtoforge.com/tutorial/centos-kubernetes-docker-cluster/ and it works... kubectl get nodes kubectl get pods --all-namespaces responses with proper answer on stdout

  2. Now I have removed kube binaries by yum remove kubeadm kubelet kubectl

  3. I have cloned https://github.com/kubernetes/kubernetes on x215 machine

  4. cd /usr/local/go/src/k8s.io/kubernetes/
  5. make quick-release did not got any errors on std out
  6. cp _output/release-stage/server/linux-amd64/kubernetes/server/bin/kubeadm /usr/bin/
  7. cp _output/release-stage/server/linux-amd64/kubernetes/server/bin/kubectl /usr/bin/
  8. cp _output/release-stage/server/linux-amd64/kubernetes/server/bin/kubelet /usr/bin/
  9. kubeadm init --apiserver-advertise-address=10.xxx.xxx.xx --pod-network-cidr=10.xx.x.x/16 same command as ran during step 1; and it fails!!!!
  10. screenshot of the error

enter image description here

1. can you help on how to build binaries successfully using latest source code?

I tried going over vast amount of blogs available online but could find help, i hope to get answer here

thanks

-- ankit patel
compilation
kubeadm
kubernetes

2 Answers

4/6/2019

eventually i figured that the latest commit on the repo is not a good state to start with. when you do yum install kubeadm kubectl kubelet; the binaries you get are compiled from stable branch tag; which is same as binary versions.

i figured that yum install is getting me v1.14.0 version of binaries; now i checked out branch with same tag and that seem to have fixed the issue

-- ankit patel
Source: StackOverflow

3/28/2019

Follow the most popular kubernetes the hard way documentation

https://github.com/kelseyhightower/kubernetes-the-hard-way/tree/master/docs

Everyone should go though those docs to get a fair understanding of kubernetes and its components like controller, etcd, api server, scheduler, kubelet, kube-proxy etc.

-- P Ekambaram
Source: StackOverflow