Kubernetes vs. Docker for Home Use

I finally got around to learning Kubernetes and got a MicroK8s installation going on an extra computer in my house. And my thoughts are... kind of torn.

To start, Docker is enough of a learning curve for many developers and Kubernetes is (in my opinion) more complicated than that. I wouldn't say it is anywhere near as complicated going from Docker to Kubernetes as it was going from nothing to Docker. Though, it definitely adds layers and will expose gaps in your Docker knowledge.

Those gaps are particularly poignant as most devs I've run into have used some sort of "crutch" in "learning" Docker. They have Visual Studio generate the dockerfile or they use templates in something like Portainer or they simply copy and paste files from whatever solution they want to use and maybe only learn to change a few variables. They don't actually understand how Docker handles ports, environment variables or storage.

Helm provides something similar for Kubernetes, but Kubernetes is much more opinionated and much of that opinion revolves around security and access. For example, NodePorts are considered unsafe for Production, but they are the equivalent of how you would typically expose applications in Docker. As such there is a mix where some templates won't expose anything because they can't be sure whether you would use in Production or in a local dev cluster or home lab setting. 

Local storage is another use case which took longer to sort out than I would have liked. In Docker, I can map a local path as a volume. I have a few use cases for this. Backups in SQL and media in things like Jellyfin. Yes, this won't really fly in a true multi-node environment, but that isn't what we're typically doing in these sorts of environments.

I have found a way to do this in Kubernetes, but it isn't as easy or intuitive. I probably need to keep looking.

On the flip side though, as a developer working with containerized workloads... they will probably be deployed via AKS, AWS or Google Cloud. Which is to say, they will likely be running in Kubernetes and not just straight-up Docker even if Docker is the container runtime. As such, it is fair to say that there would be value in learning Kubernetes. And, for a home lab, it is not uncommon to start exposing your services externally via Dynamic or Static DNS and scaling up. At which point, maybe you would eventually Kubernetes handling the container orchestration.

Realistically though, for local use, I end up feeling that Kubernetes is overkill even in those situations. As a developer, you may need to know how to build the Kubernetes equivalent of the YML files, but unless you're also responsible for the secret management and actual deployments you will likely find that someone else either wants or even NEEDS to be responsible for building and managing the Kube deployments.

So, you don't NEED it, but you still need it.

Comments

Popular Posts