Why choose simple when you can choose something simpler? That could well be the motto of Minikube, the tool that lets you run Kuber­netes on your local computer system.

Con­tain­ers have shaken up and trans­formed vast sectors of the computing industry and software de­vel­op­ment in par­tic­u­lar. They allow de­velopers to run multiple ap­plic­a­tions in­de­pend­ently inside special virtual en­vir­on­ments. Tools like Kuber­netes are used to or­ches­trate the con­tain­ers and their processes.

Kuber­netes is fast becoming the go-to solution for container man­age­ment because in addition to managing ap­plic­a­tions, services and resources, and con­fig­ur­ing and handling de­pend­en­cies, it also organises the cluster of virtual machines. Moreover, it includes ‘health checks’ that monitor the nodes, pods, and con­tain­ers in the cluster to make sure everything is running as it should.

Minikube is a pared-down version of Kuber­netes that gives you all the benefits of Kuber­netes with a lot less effort. This makes it an in­ter­est­ing option for users who are new to con­tain­ers, and also for projects in the world of edge computing and the Internet of Things. Let’s take a closer look at the Kuber­netes Minikube tool and see how it can be used, and how it manages to do without large in­fra­struc­tures.

IONOS Cloud Managed Kuber­netes
Container workloads in expert hands

The ideal platform for demanding, highly scalable container ap­plic­a­tions. Managed Kuber­netes works with many cloud-native solutions and includes 24/7 expert support.

Minikube – the min­im­al­ist­ic approach to container man­age­ment

Minikube is ideal for small container-based projects. You can use it to set up a private Kuber­netes cluster without having to work directly with an entire server or cloud platform for example. With the Minikube Kuber­netes tool, there’s no need for large in­fra­struc­tures – you just set up simple local clusters.

A computer and a single-node cluster – that’s all Minikube needs. This minimum setup is designed to appeal to software de­velopers who want a straight­for­ward way of deploying small private projects. No server or cloud provider is required. The Kuber­netes cluster simply runs on the local host. The default VM (virtual machine) runtime for Minikube is Vir­tu­al­Box, meaning the tool can be used on Windows and macOS as well as Linux. However, if you would prefer not to use Vir­tu­al­Box, you can configure Minikube to run without a virtual machine.

What Kuber­netes functions does Minikube provide?

The sim­pli­city of Minikube is also evident in the number of Kuber­netes functions that it supports:

If you’re already familiar with the features of Kuber­netes, the Minikube setup no doubt sounds rather limited. However, everything can be expanded thanks to features. Examples include the Minikube tunnel command, which works like a load balancer, Role-Based Access Control (RBAC), dash­boards, multi-clusters, and many other standard Kuber­netes features. There is also a huge range of plugins available, such as GPU support for automated error analysis or building a machine learning model.

Just as with its big brother, Kuber­netes, it’s thanks to the community that Minikube really shines. More and more con­trib­ut­ors are getting involved all the time, pushing the tool further and further. As soon as a Kuber­netes update becomes available, there’s a new version of Minikube too. And thanks to the community, there’s now a database of known issues that users can consult for help.

How does Minikube work?

It would be very hard to find a more fitting name for Minikube – the endless pos­sib­il­it­ies of Kuber­netes have been stripped down to the bare minimum so that the tool can run on a laptop or PC. Yet you needn’t worry about func­tion­al­ity. All the key features are here, and with just a few in­stall­a­tion commands, Minikube becomes a fully func­tion­al Kuber­netes cluster that’s perfect for everyday de­vel­op­ment tasks or playing around.

Minikube can run the virtual machine via a number of different hy­per­visors, for example Vir­tu­al­Box, which we mentioned above. If you already have a hy­per­visor installed on your system, Minikube will auto­mat­ic­ally set up the virtual machine. Last but not least, to send commands to your Kuber­netes cluster, you’ll need the standard command line interface, kubectl.

Once these com­pon­ents are installed, Minikube is ready to go. By default, the virtual machine will be allocated 1 GB of RAM, and a Kuber­netes cluster will be created, ready for you to configure using kubectl. One of the first things you might want to do is adjust the memory al­loc­a­tion to suit your re­quire­ments.

If you’ve worked with con­tain­ers before, the next steps will be familiar. The physical cluster is divided into multiple areas using namespaces. Creating specific namespaces via kubectl can help you maintain a clear overview of your resources. As you can see, thanks to the various add-ons, Minikube offers just as many functions as any other container system.

What is Minikube used for?

The main reason people use Minikube is to gain hands-on ex­per­i­ence of Kuber­netes. Huge clusters are not always readily available, and Minikube offers a quick way of trying things out and testing ap­plic­a­tions. The Kuber­netes website provides a com­pre­hens­ive tutorial on using Minikube, so you don’t need any prior ex­per­i­ence in order to get stuck in. And in fact, even those who are already familiar with Kuber­netes will find Minikube to be a fantastic learning en­vir­on­ment, because it offers so much scope for ex­per­i­ment­a­tion.

You can use it to test all of the Kuber­netes functions. Both tools are open-source and are dis­trib­uted under the Apache 2.0 license. They allow you to evaluate and enable/disable clusters and add-ons, and you can proceed by trial-and-error to further develop your en­vir­on­ment to create a larger Kuber­netes ecosystem.

Ex­per­i­ment­ing is all well and good. But does Minikube have other uses? The answer is yes! As well as being perfect for small private software projects, Minikube can also be used for external tech­no­lo­gies – it includes ex­per­i­ment­al support for managing NVIDIA GPUs for instance. That’s why it’s a great tool for de­velopers of machine learning al­gorithms to video games alike.

Minikube is also aimed at IT ex­ec­ut­ives. Given how fast tech­no­lo­gies change in the world of computing, CIOs should be de­vel­op­ing, testing and learning new tools all the time – but they simply don’t have the time. Thank­fully, when it comes to Kuber­netes, there’s an easy way to get up to speed: Minikube. For instance, there’s a Minikube feature for the Kuber­netes dashboard that displays detailed in­form­a­tion and usage metrics so you can check how well your ap­plic­a­tion is running on the cluster. Minikube is also perfect for giving practical demon­stra­tions (on a local machine) of how Kuber­netes works.

A small step into the big world of Minikube

Full in­struc­tions for in­stalling Minikube can be found in the official Kuber­netes doc­u­ment­a­tion, but basically, to install Minikube, you need a container system such as Docker or an en­vir­on­ment with a virtual machine, plus the native command line interface, kubectl. You can then run your first command:

minikube start

On your PC/laptop, you’ll need the following:

  • 2 or more CPUs
  • 2 GB of free memory
  • 20 GB of free disk space
  • An internet con­nec­tion
  • A container man­age­ment system or a virtual machine

Once you’ve installed kubectl, you can access your new cluster as follows:

kubectl get po -A

Minikube comes with the Kuber­netes Dashboard so you can quickly fa­mil­i­ar­ise yourself with the new en­vir­on­ment.

minikube dashboard

Now you can start creating de­ploy­ments. To create a sample de­ploy­ment and expose it on port 8080, enter:

kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
kubectl expose deployment hello-minikube --type=NodePort --port=8080
Note

These commands make use of an existing image called echoserv­er, but you can change this and use your own image here if you prefer.

It may take a moment, but if you run the following command, you should see your de­ploy­ment:

kubectl get services hello-minikube

The simplest way to access this service is to get Minikube to launch a web browser:

minikube service hello-minikube

Al­tern­at­ively, you can use kubectl to forward the port:

kubectl port-forward service/hello-minikube 7080:8080

Finally, here are some general admin commands for the cluster:

Pause Kuber­netes without impacting deployed ap­plic­a­tions:

minikube pause

Halt the cluster:

minikube stop

Increase the default memory limit (requires a restart):

minikube config set memory 16384

Browse the catalogue of Kuber­netes services:

minikube addons list

Create a second cluster running an older Kuber­netes release:

minikube start -p aged --kubernetes-version=v1.16.1

Delete all of the Minikube clusters:

minikube delete --all
Tip

Want to know more about Minikube’s big brother, Kuber­netes? Then check out our detailed Kuber­netes tutorial for lots of practical tips.

Go to Main Menu