Setup a kubernetes cluster with bare metal servers from different subnets

9/25/2019

What I am doing right now:

I own many VPS which I use to deploy applications with Docker compose, most of the machines come from different subnets and have a public static IP address.

For each new application I would pick a random VPS, assign the new application's subdomain's DNS with the VPS' IP address and deploy my application in this VPS behind an Nginx proxy (jwilder Nginx).

This approach is in my opinion very comfortable since jwilder's Nginx does almost the work for me and I only have to assign the correct DNS.

What I want to achieve:

For the purpose of learning, I would like to take the machines and make a Kubernetes cluster out of them, so I could learn more about this technology. My idea is that I only have to assign new subdomain's DNS to one single point, which also plays the role of a load balancer and pass the traffic to corresponding pods.

To redirect traffic to a new application I only have to configure the load balancer.

My problem:

I know this question is not very precise since I don't know a lot of Kubernetes. Moreover, my servers are not from a cloud provider like Google or AWS and I, therefore, can not use their solutions. They are not even from a single cloud provider, most of them are of my university and some are from a private cloud provider.

Could anybody tell me how can I achieve this?

-- Long Nguyen
cloud-bare-metal
kubernetes
nginx

1 Answer

9/26/2019

I think the answer is kubeadm, you can install it on your own pc or vm.

It is gonna create a single control-plane cluster which could be joined by other of your vms and create a kubernetes cluster.

kubeadm helps you bootstrap a minimum viable Kubernetes cluster that conforms to best practices

kubeadm is designed to be a simple way for new users to start trying Kubernetes out, possibly for the first time, a way for existing users to test their application on and stitch together a cluster easily, and also to be a building block in other ecosystem and/or installer tool with a larger scope.

Your cluster pods will communicate via CNI.

CNI was created as a minimal specification, built alongside a number of network vendor engineers to be a simple contract between the container runtime and network plugins

-- jt97
Source: StackOverflow