Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install kubernetes manually?

Tags:

kubernetes

While getting familiar with kubernetes I do see tons of tools that should helps me to install kubernetes anywhere, but I don't understand exactly what it does inside, and as a result don't understand how to trouble shoot issues.

Can someone provide me a link with tutorial how to install kubernetes without any tools.

like image 408
Andriy Kopachevskyy Avatar asked Nov 14 '16 16:11

Andriy Kopachevskyy


People also ask

Can I install Kubernetes locally?

You can download Kubernetes to deploy a Kubernetes cluster on a local machine, into the cloud, or for your own datacenter.

Can I install Kubernetes without Docker?

You can decide to use Kubernetes without Docker, or even Docker without Kubernetes for that matter (but we advise you to use it for different purposes than running containers). Still, even though Kubernetes is a rather extensive tool, you will have to find a good container runtime for it – one that has implemented CRI.


1 Answers

For simplicity, you can view k8s as three components

  • etcd
  • k8s master, which includes kube-apiserver, controller, scheduler
  • node, which contains kubelet

You can install etcd and k8s master together in one machine. The procedures are

  1. Install etcd. Download etcd package and run it, which is quite simple. Remember the port of etcd service, e.g. 2379,4001, or any you set.
  2. Git clone the kubernetes project from github. Find the executable binary file, e.g. for k8s version 1.3, you can find kube-apiserver, kube-controller-manager and kube-scheduler in src/k8s.io/kubernetes/_output/local/bin/linux/amd64 folder
  3. Then run kube-apiserver, specify the etcd ip and port (e.g. --etcd_servers=http://127.0.0.1:4001)
  4. Run scheduler and controller, specifying the apiserver ip and port(e.g. --master=127.0.0.1:8080). There is no oreder between scheduler and controller
  5. Master is running so far. Make sure these processes run without errors. If etcd exits, apiserver would exit. If apiserver exits, scheduler and controller would exit.
  6. On another machine(virtual preferred, network connected), run kubelet. Kubelet could also be found in previous folder(src/k8s.io/kubernetes/_output/local/bin/linux/amd64), specify apiserver ip and port(e.g. --api-servers=http://10.10.10.19:8080). You may install docker or something else on node, which to prove that you could create a container.
like image 106
fibonacci Avatar answered Oct 02 '22 13:10

fibonacci