Does it makes sense to manage Docker containers of a/few single hosts with Kubernetes?

3/18/2018

I'm using docker on a bare metal server. I'm pretty happy with docker-compose to configure and setup applications.

Still some features are missing, like configuration management and monitoring maybe there are other solutions to solve this issues but I'm a bit overwhelmed by the feature set of Kubernetes and can't judge if it would help me here.

I'm also open for recommendations to solve the requirements separately:

  • Configuration / Secret management
  • Monitoring of my docker hostes applications (e.g. having some kind of dashboard)
  • Remot container control (SSH is okay with only one Server)
  • Being ready to scale my environment (based on multiple different Dockerized applications) to more than one server in future - already thinking about networking/service discovery issues with a pure docker-compose setup

I'm sure Kubernetes covers some of these features, but I have the feeling that it's too much focused on Cloud platforms where Machines are created on the fly (since I only have at most few bare metal Servers)

I hope the questions scope is not too broad, else please use the comment section and help me to narrow down the question.

Thanks.

-- Tarion
docker
kubernetes
server

1 Answer

3/18/2018

I think the Kubernetes is absolutely much your requests and it is what you need.

Let's start one by one.

I have the feeling that it's too much focused on Cloud platforms where Machines are created on the fly (since I only have at most few bare metal Servers)

No, it is not focused on Clouds. Kubernates can be installed almost on any bare-metal platform (include ARM) and have many tools and instructions which can help you to do it. Also, it is easy to deploy it on your local PC using Minikube, which will prepare local cluster for you within VMs or right in your OS (only for Linux).

Configuration / Secret management

Kubernates has a powerful configuration and management based on special objects which can be attached to your containers. You can read more about configuration management in that article.

Moreover, some tools like Helm can provide you more automation and range of preconfigured applications, which you can install using a single command. And you can prepare your own charts for it.

Monitoring of my docker hostes applications (e.g. having some kind of dashboard)

Kubernetes has its own dashboard where you can get many kinds of information: current applications status, configuration, statistics and many more. Also, Kubernetes has great integration with Heapster which can be used with Grafana for powerful visualization of almost anything.

Remot container control (SSH is okay with only one Server)

Kubernetes controlling tool kubectl can get logs and connect to containers in the cluster without any problems. As an example, to connect a container "myapp" you just need to call kubectl exec -it myapp sh, and you will get sh session in the container. Also, you can connect to any application inside your cluster using kubectl proxy command, which will forward a port you need to your PC.

Being ready to scale my environment (based on multiple different Dockerized applications) to more than one server in future - already thinking about networking/service discovery issues with a pure docker-compose setup

Kubernetes can be scaled up to thousands of nodes. Or can have only one. It is your choice. Independent of a cluster size, you will get production-grade networking, service discovery and load balancing.

So, do not afraid, just try to use it locally with Minikube. It will make many of operation tasks more simple, not more complex.

-- Anton Kostenko
Source: StackOverflow