1

I am searching for a solution that enables me to set up a single node K8s cluster and if I needed I add nodes to it later.

I am aware of solutions such as minikube and microk8s but they are not expandable. I am trying k3s at the moment exactly because it is offering this feature but I have some problems with storage and other stuff that I am working on them.

Now my questions:

  • What other solution for this exists?
  • What are the disadvantages if I untaint the master node and run everything there (for a long period and not just for test)?
AVarf
  • 4,481
  • 9
  • 47
  • 74

3 Answers3

1

You can expand k3s cluster via k3sup join.Here is guide.

Key Kubernetes services such as kube-apiserver, kube-scheduler should be available and running smoothly at all times on master nodes. Therefore, it is essential to have dedicated resources for the master nodes, and avoid having other non-critical workloads interfere with the functioning of the master services

Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
  • That is what I use for setup clusters but this is not my question. I want to run K8s on some edge device and I don't want to start with a huge server. I want to start small and if I see there is too much load I add workers so I need something that is reliable. What are the risks/disadvantages of running stuff on master for a long period of time? – AVarf Feb 25 '20 at 14:38
  • I misunderstood the question..have edited my answer accordingly. – Arghya Sadhu Feb 25 '20 at 14:58
1

You can use kubeadm to setup a single node "cluster". Then you can use the join command to add more nodes

fat
  • 5,098
  • 4
  • 28
  • 31
  • Kubeadm is what I use to setup clusters but that was not my question. I want to run K8s on some edge device and I don't want to start with a huge server. I want to start small and if I see there is too much load I add workers so I need something that is reliable. What are the risks/disadvantages of running stuff on master for a long period of time? – AVarf Feb 25 '20 at 14:49
  • 1
    If you have a single node (the master) your biggest concern should be availability since you are on a big SPOF. Furthermore, k8s will add some overhead to your software stack, so another concern is the % of resources used by k8s itself (same for k3s but using less resources). To be completely honest i never run such a "cluster" for a long time so I might be ignoring other concerns. – fat Feb 25 '20 at 14:57
  • Since it is edge the cluster is not critical. Based on my experience the overhead of K8s in comparison to, for example, a central logging stack or the applications that we run is totally neglectable but still, I don't want to go into this with my eyes closed. – AVarf Feb 25 '20 at 15:01
0

What are the disadvantages if I untaint the master node and run everything there (for a long period and not just for test)?

Failure of the worker will of course bring down your applications. When you recover it or spin up another one, K8s will recover your apps for you.

Failure of the master will not adversely affect your systems only the cluster's ability to manage itself and its self-healing capabilities (which will affect uptime at some point).

I am searching for a solution that enables me to set up a single node K8s cluster and if I needed I add nodes to it later.

To the best of my knowledge, there is no such thing as single node production ready k8s cluster. For something small and simple you can check Rancher.

What other solution for this exists?

  • kubeadm allows you to install everything on a single node. Install kubeadm on the node, "kubeadm init", install a pod network, then remove the master taint.

  • Another solution you may be interested in is the Kubespray.

Some "honorable mentions" are:

  • Charmed Kubernetes by Canonical allows you to do everything on one node; however it should be quite a big node, so may be not the case here (but still worth mentioning).

  • If you don't really require all the k8s power (with only one small node), then Nomad could be an alternative.

Let me know if that helps.

Nick
  • 1,882
  • 11
  • 16