Minikube, Kubernetes’ best friend: 6 facts to know
If your team is building apps for containers and Kubernetes, get to know Minikube. This free open source tool helps developers do experiments and packs a punch in demonstrations
Minikube is an open source tool that enables you to run a single-node Kubernetes cluster on a laptop. To think of it another way, it takes the grand scale of Kubernetes and slims it down to fit run locally in a virtual machine, no cloud or on-premises data center required.
Don’t let the “mini” fool you: Minikube packs a punch.
So if it’s a “lite” version of Kubernetes at large, what’s the point? Why use it?
There are plenty of reasons, from training to development to testing and more. So don’t let the “mini” fool you: Minikube packs a punch.
For starters, while running Minikube locally might limit you to a single-node cluster, you’re not sacrificing too much in the way of functionality. Minikube supports significant Kubernetes features such as DNS, NodePorts, ConfigMaps and Secrets, Dashboards, the Docker, CRI-O and containerd runtimes, Ingress, and Container Networking Interface (CNI). And Minikube’s add-ons and extensibility – more on these below – further betray the “mini” in Minikube. It’s plenty powerful for its intended use, which is to run a Kubernetes cluster locally. It’s the scope that is downsized more than the functionality.
[ Keep tabs on Kubernetes: 5 Kubernetes trends to watch in 2020. ]
With that in mind, let’s look at six more things IT leaders and practitioners should know about Minikube:
1. Minikube can help you make the case for Kubernetes
“Minikube is a great way for some IT decision-makers to get a ‘lab’ experience.”
“Technical leaders in IT are always on point to make the base case for meaningful change enabled by the injection of relevant technologies,” says E.G. Nadhan, Red Hat chief architect and strategist, North America Commercial. “When doing so, they are required to do this for a wide spectrum of leadership personalities.”
In other words, some of them want to dive deeper than others with Kubernetes technology. “Minikube is a great way for some IT decision-makers to get a ‘lab’ experience – especially if it is done in the context of business outcomes that matter to the enterprise,“ Nadhan says.
If you’re struggling to help leaders at varying levels of the organization grasp what Kubernetes could do to speed progress toward business goals, Minikube on a laptop could help you make that case. “Minikube is a great example of how technology can influence the mindset – one leader at a time,” Nadhan says.
Did we mention Minikube is free?
[ Kubernetes terminology, demystified: Get our Kubernetes glossary cheat sheet for IT and business leaders. ]
2. Minikube is free and relatively easy to start using
Kubernetes has developed a reputation for a steep learning curve, particularly when you’re talking about running it in production. By definition and design, however, it’s relatively simple to get a cluster up and running locally with Minikube.
[ Related read: Kubernetes: 3 ways to get started. ]
It’s a free download that can run on any of the major OSes, and the official Kubernetes documentation has clean instructions for installing Minikube, as well as a tutorial for creating a Hello World app to start getting some hands-on practice. If you’re using an RHEL/Fedora/CentOS workstation, our sibling site Opensource.com has a step-by-step guide on getting started with Minikube tailored specifically for you.
3. Minikube is especially good for developers
While anyone can use Minikube, it’s a particularly good fit for developers, for all manner of purposes, from hands-on learning about Kubernetes to testing and day-to-day development work.
Minikube can be especially valuable for developers and teams that are just beginning to kick the tires on Kubernetes.
“Minikube is great for developers to try something locally,” says Tom Manville, engineering lead at Kasten. Manville notes that you shouldn’t try to run Minikube in a production environment. It simply wasn’t intended as a tool for managing a production cluster, so to try doing so would be sort of like using a screwdriver to hammer a nail.
Again, it offers a low barrier to entry: Minikube puts a slimmed-down version Kubernetes on your local machine, without much in the way of cost or pain. This can be especially valuable for developers and teams that are just beginning to kick the tires on Kubernetes. You don’t even need to spin up a new environment, just a VM running locally.
“Developers who wish to quickly start learning Kubernetes, without having to invest in or utilize a multi-node Kubernetes cluster on-premises or [in a] cloud, can use Minikube as a first step,” says Raghu Kishore Vempati, director of technology, research, and innovation at Altran. “Minikube powers the capability of a Kubernetes cluster to run in a single box with limited resources.”
4. Minikube works well for testing
Beyond learning and experimentation, Minikube can be a good developer tool for testing purposes, especially when building new applications, thanks to add-ons for more complex features. If you’re building apps specifically to be run in containers and managed with Kubernetes, Minikube is a good tool for your laptop.
“For developers building cloud-native applications, Minikube can be used to perform initial testing locally, before they put them through a more formal test cycle,” Vempati says.
Minikube lets you test out heavier-duty features on that local box.
Even though you’re running it locally, Minikube offers a lot of add-ons and extensibility, which enables you to test out heavier-duty features on that local box.
“Minikube also provides the ability to utilize and test a few complex features locally,” Vempati says. “For example, for an application running on a K8s cluster that needs to consume an NVIDIA GPU for processing, Minikube provides driver-installer and GPU-device-plugin add-ons that help developers to achieve the functionality.”
Vempati adds that there are several such add-ons so that developers can test the features and their own applications, such as the EFK add-on (Elasticsearch, Fluentd, and Kibana) for log analysis, Helm server (Tiller), and Kubernetes Dashboard. For teams exploring a service mesh approach in a microservices architecture, Vempati also points out there’s an Istio add-on in Minikube: “[This] helps developers to test the functionality in a limited way before they are pushed to a larger K8s cluster for verifying scalability.”
Manville concurs about the development value of Minikube support for these add-ons. “It supports add-ons so features like Helm (Tiller), an ingress controller, and the Kubernetes Dashboard are easy to enable,” Manville says, adding that Minikube can also be useful for trying out new versions of Kubernetes before upgrading your clusters.
5. Minikube is extensible: You can customize
In a similar vein as the existing add-ons, Minikube is open source and extensible, which enables developers to build their own and generally customize their Minikube cluster.
“Minikube is open source under the Apache 2.0 license,” Vempati says. “Developers can extend Minikube particularly to create custom add-ons and provide a customized version of Minikube. This approach is particularly useful in large organizations where developers use a Minikube version with customized add-ons.”
This extensibility is viewed in the Kubernetes community as one of Minikube’s key benefits, just as extensibility is one of the major allures of the broader Kubernetes platform. In short, it gives developers and other IT pros more flexibility and power. It enables you to choose other flavors than plain vanilla, without ruling out vanilla as the perfect choice.
6. It’s not the only tool for running Kubernetes locally
Minikube is a strong option, but it’s not the only local development tool available. There are other tools that might be a good fit, depending on your particular environment and needs.
MORE ON KUBERNETES
Kubernetes in production vs. Kubernetes in development: 4 myths
7 best practices: Building applications for containers and Kubernetes
Migrating applications to containers and Kubernetes: 5 best practices
Manville points to Minikube’s “cousin,” Minishift, a tool for running OKD locally, as a good example. (OKD is the Kubernetes distribution embedded in Red Hat OpenShift.) Manville is also a fan of kind (Kubernetes IN Docker), especially if you’re looking to integrate with a CI/CD pipeline.