{{announcement.body}}
{{announcement.title}}

Build Your Own Kubernetes Cluster

DZone 's Guide to

Build Your Own Kubernetes Cluster

In this article, we discuss some of the best tools to help you stand up your own Kubernetes cluster.

· Cloud Zone ·
Free Resource

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 don't more companies run 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 Minikube. 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? 

Imixs-Cloud

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 that 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 roll 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. 

K9S

Typically, you control your Kubernetes cluster with the kubectl 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.

K9s CLI

Traefik.io

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.

Traefik.io dashboard

Storage

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.

Longhorn dashboard

Container Registry

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.

Harbor for contianer registry

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!

Topics:
cloud ,contianer ,k9 ,kubernetes ,traefik

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}