I have looked through internet, kubernetes documentation and stuff and I have not found an answer for very simple question: how can I make a simple physical machine with ubuntu as OS, an Kubernetes node and connect it to existing cluster? The answer I have found are not actual anymore or focusing mostly on cloud solutions (or just adding a node is totally omitted).
PS. I am starting my adventure with Kubernetes so a bit detailed answer would be preferrable.
You really want to use a cloud provider. While you can see the most basic blocks such as pods running on a machine under your table, once you get to load balancer services and volume claims which require provider specific provider implementations that no longer makes sense. Use minikube to get your feet wet, once you outgrow that start you have to start looking at a cloud provider.
In the case of say aws
, kops
tool make a lot of things easy.
For example, here are some basic commands that allow easy addition / removal / upgrading of EC2 instances to your kubernetes
cluster. (both masters and/or worker nodes), via the so called concept of instancegroups
.
That being said, as Lev Kuznetsov points out implicitly, the process can vary based on whether you are on a local machine, bare metal, VMs, or the cloud.
I do not think there is an one-size-fits-all solution.
From my recent experience with kubernetes
, the thing you are asking for I am expecting to be fairly complicated in non-cloud environments where some automation already exists.
To create an additional node (especially manually) would require signficant work in terms of boostrapping it (provisioning security, replicating etc
in case of masters, spin up the necessary kube-system
containers etc).
In any case, for non-cloud envs, I am assuming you should consider kubeadm and try to investigate if it makes things as easy as kops
.
You should also consider for a more detailed approach the now famous kubernetes-the-hard-way guide, which addresses the bootstrapping process in more depth.