Kubernetes is definitely the most widely used solution when it comes to container platforms. Everyone knows it by now and it is not only used successfully in large projects. But I think it is also true that many projects do not run Kubernetes themselves but use one of the major platform operators. But why is it like that? It is not always a good idea to give up control. And certainly not when it comes to your own data.
So the question is why not more companies running their own Kubernetes cluster. The answer lies in the steep learning curve that Kubernetes brings with it. And I know from my own experience that this learning curve is very, very steep. Yes, of course there is this Minikube project. But this is childish and not suitable for more than exploring the basics on your own laptop. On the other hand, you can get scared if you read the installation guides on the Kubernetes project page, or some admin blog about the problems in building a highly available cluster environment.
But much of what is written there has nothing to do with the reality of small and medium-sized organizations. If you don’t plan on running tens of thousands of services across a dozen data centers on different continents, don’t be shy. Maybe you plan to run a dozen WordPress installations for your web site or your own business application. So what do you really need to build your own Kubernetes cluster?
To answer this question I started the open source infrastructure project Imixs-Cloud. The goal of this project is to build, run and maintain business applications in a production ready and self managed kubernetes cluster. The project is designed for small and medium-sized organizations who want to keep control of their own data.
The complete infrastructure of a Imixs-Cloud environment is described in one central configuration directory. The directory contains all your applications and kubernetes objects. The Configuration Directory can be synchronized with a code repository like Git. This makes it easy to role back changes if something went wrong. And you can easily start with your own environment by just forking the project from the Github repository.
Of course, it is not enough to set up a cluster with 3 machines. You also need tools to manage your cluster and solve basic things, such as data storage or Internet access via https. For that reason the Imixs-Cloud project does not only offer a setup guide to run a kubernetes cluster but also integrates tools to make your daily work easier.
Typically you control your kubernetes cluster with kubectl a command line tool. A more convenient way to obtain information about your cluster provides the tool K9s. K9s is a powerful terminal tool to interact with your Kubernetes cluster.
To access your applications from outside of your cluster Imixs-Cloud integrates the Ingress Router Traefik.io. This tool allows you to easily expose your services to public Internet addresses.
To run stateful docker images (e.g. a Database like PostgreSQL) you need to define a storage volume along with your service. Due to its simplicity and the very good integration in Kubernetes, we use Longhorn as the preferred storage solution within Imixs-Cloud.
Docker images are available on docker registries. Registries can be public or private. If you develop your own business applications a private registry is important to manage your docker images. The Imixs-Cloud includes a setup to run the registry Harbor. Habor is a secure, performant, scalable, and available cloud native repository for Kubernetes.
Fork it on Github
The Imixs-Cloud project is open source and hosted on Github. The project is constantly under development and I sincerely invite you to participate in it. If you have any questions just open a new Issue on Github and start a discussion. So, don’t be afraid to run your Kubernetes cluster yourself!
One Reply to “Build Your Own Kubernetes Cluster”
Thanks for the article! I will have to try this out.