Setup a Local K8s environment

If you are lucky enough to have a development Kubernetes cluster setup for your team, you may not be interested in this post. However, It’s possible to simulate the production cluster locally on your Laptop!

I will present 4 tools to run K8s cluster(s) locally. Keep in mind that the cloud and DevOps world is changing rapidly and new tools and platforms are popping up everyday!

Docker Desktop

Docker Desktop is an easy-to-install application for your Mac or Windows environment that enables you to build and run containerized applications. It includes a single-node Kubernetes cluster which runs as a docker container within Docker (a little bit of inception)!

A multi-node K8s cluster is deployed normally on multiple hosts. These hosts can be bare-metal hardware in a data center or virtual machines. If you are interested in deploying a real world cluster on real hardware, consider the deployment on Raspberry Pi ;)

If you like to confuse yourself more about Docker & K8s, I strongly recommend this article.

Minikube

Minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes. It allows you to run a multi-node clusters on multiple deployment (which you don’t have on Docker Desktop). Minikube can be deployed on container runtime (not all containers are Docker ;), Virtual machine like Oracle VirtualBox or directly on hardware. for all possible deployment scenarios, please check the drivers!

If you like to know more about the differences between Docker Desktop & Minikube, I strongly recommend this well-written post.

Kind

While Minikube can run K8s cluster on containers, VMs and bare-metal, Kind deploys K8s on Docker containers. This leads to a significantly faster startup speed compared to spawning VM. It can be used as learning environment as well as a development environment for a team! Kind supports multi-node (including high-availability) clusters. It runs on Linux, macOS, and Windows.

Both Minikube & kind give you for freedom to configure the local cluster (like load balancer, ingress..,) than Docker Desktop. For more details about the differences between Minikube & Kind, have a look here.

Openshift

Not all containers are Docker! Not all K8s are Kubernetes.io! Redhat has its own distribution of Kubernetes and has its development and/or local cluster as well.

There is a major difference in the installation of 3.x & 4.x Openshift. Therefore, If you want to run a single-node K8s cluster, use Minishift. It runs the cluster on a VM. Code Ready Containers CRC brings a minimal OpenShift 4.x cluster to your local computer that provides a minimal environment for development and testing purposes. CRC is mainly targeted for use on developers’ desktops.

For more details about Openshift vs Kubernetes, please check these 2 posts (post1, post2).

Conclusion

The best way to understand the modern distributed and containerized application deployment is to get your hands dirty with code! Running a local Kubernetes cluster for learning and development on your laptop is the best way to start. There are many tools and framework online and the 4 presented tools should be a good start for a single-node cluster.

--

--

--

Code Factory Berlin is building tailored made DevOps and developers tools for the enterprise. We love & do open source.

Recommended from Medium

Kubernetes — How to setup Kubernetes Cluster On Premise

Seven Reasons to Move Team Communication to Slack

Walt https://t.co/l4fIwlU61b https://t.co/syixlI8e7d

Agile — iterative and incremental way of product development

Soft Skills for Software Developers

Innovation is the result of continuous learning

The screen of the write step, where you upload the “side stories”

SketchUp Axes Tips

How to Install Apache Web Server on CentOS7

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Soulaiman Ghanem

Soulaiman Ghanem

Writes about technology, products and productivity

More from Medium

What Are Ephemeral Environments? + How to Deploy and Use Them Efficiently

Creating S3 Upload Presigned URL with API Gateway and Lambda

Cloud Computing: Stick to Open Standards

Docker VS Kubernetes: What’s The Difference?