Kubernetes is an open source orchestration platform for containers. Developed by Google, it offers an open source system for automating deployment, scaling, and managing containerized applications. Although most people run Kubernetes in a cloud environment, running a Kubernetes cluster locally is not only possible, it has at least two benefits:
- You can quickly try out Kubernetes before deciding to use it as your primary platform to deploy your application.
- You can set it up as a local development environment before pushing anything to a public cloud, thus allowing separation between the development environment and the production environment.
More on Kubernetes
- What is Kubernetes?
- eBook: Storage Patterns for Kubernetes
- Test drive OpenShift hands-on
- eBook: Getting started with Kubernetes
- An introduction to enterprise Kubernetes
- How to explain Kubernetes in plain terms
- eBook: Running Kubernetes on your Raspberry Pi homelab
- Kubernetes cheat sheet
- eBook: A guide to Kubernetes for SREs and sysadmins
- Latest Kubernetes articles
Setting up a local Kubernetes environment as your development environment is the recommended option, no matter your situation, because this setup can create a safe and agile application-deployment process.
Fortunately, there are multiple platforms that you can try out to run Kubernetes locally, and they are all open source and available under the Apache 2.0 license.
- Minikube has the primary goals of being the best tool for local Kubernetes application development, and to support all Kubernetes features that fit.
- kind runs local Kubernetes clusters using Docker container "nodes."
- CodeReady Containers (CRC) manages a local OpenShift 4.x cluster optimized for testing and development purposes.
- Minishift helps you run OpenShift 3.x clusters locally by running a single-node OpenShift cluster inside a virtual machine (VM).
Minikube is the most well-known and popular choice to run a Kubernetes environment on a local computer. No matter what operating system you use, Minikube's documentation offers an easy installation guide for you. Generally, installing Minikube is as simple as running two commands:
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-PLATFORM-amd64
$ sudo install minikube-PLATFORM-amd64 /usr/local/bin/minikube
Minikube quickly sets up a local Kubernetes cluster on Linux, macOS, or Windows with the following features:
- Supports the latest Kubernetes release (+6 previous minor versions)
- Cross-platform (Linux, macOS, Windows)
- Deploys as a VM, a container, or on bare-metal
- Multiple container runtimes (CRI-O, containerd, Docker)
- Docker API endpoint for blazing-fast image pushes
- LoadBalancer, filesystem mounts, FeatureGates, and other advanced features
- Add-ons for easily installing Kubernetes applications
Because Minikube is an open source project, you can contribute to its source code.
kind's developers describe it as "a tool for running local Kubernetes clusters using Docker container 'nodes.'" It was designed for testing Kubernetes but may also be used for local development or continuous integration.
- Multi-node (including high-availability) clusters
- Building Kubernetes release builds from source
- Make/Bash/Docker or Bazel, in addition to pre-published builds
- Linux, macOS, and Windows
In addition, kind is a Cloud Native Computing Foundation (CNCF)-certified conformant Kubernetes installer. Because it's open source, you can find kind's source code in its GitHub repository.
CodeReady Container (CRC)
If you want to try the latest version of OpenShift locally, try Red Hat CodeReady Containers (CRC). 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.
You can find CodeReady Container's source code on GitHub, also available under the Apache 2.0 license.
The Minishift project helps you run a version of OpenShift with OKD locally with a single-node OpenShift cluster inside a virtual machine. You can use it to try OpenShift or to develop for the cloud, on your local host.
Like the other tools on this list, Minishift is open source, and you can access its source code on GitHub.
Kubernetes for the people
As you can see, there are several ways to try out Kubernetes in your local environment. Did I miss anything? Feel free to leave a comment to ask a question or make a suggestion.