I have been playing around with Kubernetes and Docker for almost 2 weeks now on a self-built cluster.

It is highly scalable, and if you use it properly, it will reduce the downtime of your application significantly. However, I came along with a lot of rebuilds, issues and limitations, and would like to share in this article.

Availability of the right build for the right container image

The first thing that came into my mind when I am trying to build my own website is to find the right software to be used. Apart from functionality, there are also a lot of other considerations, especially when it comes to finding the right container image.

In the world of Kubernetes, and containers in general, you can find prebuilt software images either through Helm (for Kubernetes full stack management) or Docker Hub (for container images only).

They both work like Linux package management software, like apt or yum.

However, finding the right software is not as easy there, you have to consider:

  1. Is the right software package available, with the right configuration options? Bear in mind that you may not have access to the raw configuration files (the container may construct them for you). As such, some special features may not be fully available, or the setup may not fit your infrastructure entirely.
  2. Is the container image available in the right operating system and architecture? I find it hard, especially using official repositories, to find images for ARM processor, which my cluster is running on.
  3. How is persistent storage being handled? You may need to review the image configuration options (e.g. the docker-compose file) to dig around.
  4. Unless you are using an official repositories or those from "verified" publisher, you may find the images that you are using out-of-date and may contain security vulnerabilities.

So, how do I mitigate the shortcomings?

Finding the right software that is fit for work is a skill that is essential to any IT managers. After all, it comes doen to the following criteria:

  1. What kind of function do you need?
  2. What is the cost?
  3. Does it work with the platform that you want it to run on?
  4. How easy is it to maintain the software in a long run?

My opinion with Kubernetes specific answer to the above are:

  1. There are so many commercial / open source offering available, and they often come with docker images. Try out the demo sites is essential. If a software do not even has a demo, how good can it be?
  2. Once you have found the top choices (often 2 or 3), check in Docker Hub to see if they are available as docker image, and whether they are maintained by the software author or a verified publisher.
  3. Cost is a commercial preference. For setting up my own website, I do not want to spend a dime, so open source it is. But if you want to find a reliable database with commercial support, maybe go with PostgreSQL which provides paid support options.
  4. Stick with a common platform in the Kubernetes cluster. For my example, I run Raspberry Pi and low cost x86-64 servers. So I have chosen Ubuntu which can work in both architecture, configurations and software repository are almost the same. It makes administration consistent.
  5. Eventually I may move my website to Google Cloud or AWS,  so I tried to stick with containerised software as much as possible, and try to stick with standard configurations.
  6. I opted for the LTS branch or Ubuntu for now to avoid major OS upgrade as long as possible.
  7. Only try to build docker images by youself as a last resort.

The above principles does not only work with my choices in Kubernetes, but also work in general in the technology industry. After all I worked in this field for so many years and the the principles work really well so far!