+4 votes
180 views
in Tools by (242k points)
reopened
Minikube: the best of Kubernetes with minimal effort

1 Answer

+5 votes
by (1.6m points)
edited
 
Best answer

Minikube: the minimalist model of container management
Minikube Features
How does Minikube work?
Areas of application of Minikube
A little introduction to the big world of Minikube

image

Minikube: the best of Kubernetes with minimal effort

Why choose something simple when you can choose something even simpler? This is the motto of the Minikube tool, with which you can run Kubernetes locally on your own computer..

Containers have revolutionized and changed much of IT, especially when it comes to software development. Thanks to containers, applications can run independently and in parallel in a specially designed virtual environment. To orchestrate containers and their processes, tools like Kubernetes are required.

This orchestration tool is establishing itself as a comprehensive solution, because it not only manages applications, services and resources, in addition to configuring and networking their dependencies, but also organizes the existing virtual machine infrastructure. At the same time, Kubernetes offers control processes that monitor the health of the nodes, pods, and containers available in the cluster..

advice

Kubernetes offers benefits in all aspects of container-based virtualization . However, by including so many options, the implementation, monitoring and maintenance of the tool are quite complicated. With Managed Kubernetes, you ensure that you can operate this container software productively and efficiently. The configuration of Kubernetes clusters is fully automated, and each subsequent use is accompanied by a thorough management system.

Minikube is a reduced Kubernetes distribution that allows you to achieve the maximum functional performance of this tool with minimal effort. This is not only interesting for those who are starting to use containers, but also, and above all, in the world of edge computing and the Internet of things. In this article, you will discover what Minikube is, what this tool is used for and how it can do without large infrastructures..

Index
  1. Minikube: the minimalist model of container management
  2. Minikube Features
  3. How does Minikube work?
  4. Areas of application of Minikube
  5. A little introduction to the big world of Minikube

Minikube: the minimalist model of container management

Minikube is the ideal solution for small container-based projects . It allows you, for example, to configure a Kubernetes cluster privately without having to work directly with an entire server or cloud. Unlike Kubernetes, Minikube dispenses with large infrastructures and can easily configure clusters locally.

A computer and a cluster with a single node: this is the space that Minikube needs. This minimum requirement is especially suitable for small private projects, which software developers can now easily implement thanks to Minikube. You don't need a server or cloud, as the Kubernetes cluster simply runs on localhost. Minikube works by default with VirtualBox as virtualization software, so it can be used not only on Linux, but also on Windows or macOS. However, if you prefer to work without VirtualBox, Minikube also manages to expand in a way that does not require this software.

Minikube Features

The simplicity of Minikube is also noticeable in its functions. The tool supports the following Kubernetes features:

  • DNS
  • NodePorts
  • ConfigMaps and Secrets
  • Dashboards
  • Container runtime environments: Docker or alternatives to Docker like rkt, CRI-O, or containerd
  • CNI (Container Network Interface) compatibility
  • Ingress

If you are already familiar with Kubernetes features, Minikube will seem very limited. However, it can be extended with other features , such as the Minikube tunnel, which works like a LoadBalancer using role-based access control (RBAC), dashboards , multiclusters, and many other Kubernetes standards. There are also a variety of add-ons, such as GPU support for automatic error analysis or alignment in the realm of machine learning.

Like its older brother, Kubernetes, Minikube is kept alive by its community . Many new collaborators are adding to its development without rest, improving the tool more and more. In addition, as soon as Kubernetes is updated, Minikube also moves to the new version, for example, if a catalog of solutions has been published that users can simply refer to when they have a known problem.

How does Minikube work?

Rarely has the name of a computer tool been more accurate than that of Minikube. With this application, the many capabilities of Kubernetes are minimized to fit on a PC or laptop. First of all, basic functionality is guaranteed, and with just a few installation commands, the Minikube becomes a fully functional Kubernetes cluster that can be used not only as a training platform, but also for routine development tasks.

Minikube can work with various hypervisors as a virtualization system. If a hypervisor is installed on the system (such as VirtualBox, mentioned above), Minikube automatically configures the virtual machine. What's more, to instruct the Kubernetes cluster, all you need is the standard kubectl command line.

After all the components are installed, the Minikube can be started. 1 GB of memory is allocated by default to the virtual machine and a Kubernetes cluster is created, which can now be configured through kubectl. A first measure of rigor might be, for example, to change the allocated memory as needed.

At this point, if you already work with containers, the terrain will be familiar to you. With the help of namespaces, physical clusters are divided into several areas. For a better overview of resources, you can create your own namespaces with kubectl. On the other hand, through the use of plugins, the functions of Minikube can be made as diverse as those of any other container system.

Areas of application of Minikube

The most important area of ​​use for Minikube is to gain hands-on experience with Kubernetes . Large clusters are not always available for free, and Minikube offers a quick way to test the tool or see if an application works. Kubernetes itself provides a detailed tutorial for Minikube , so no prior experience is required to start using it. Minikube can also be a good learning environment for users who are already familiar with Kubernetes, as it allows constant experimentation.

Minikube is therefore a test bed for all Kubernetes functions. Both tools are open source and have the Apache 2.0 license. Clusters and their plug-ins can be effectively evaluated, activated, deactivated, and extended. The latter can be further developed using simple trial and error, creating an even larger Kubernetes ecosystem.

Apart from easily testing and developing small private software projects, Minikube can also be used for external technologies; among other things, as experimental support for NVIDIA GPUs. For this reason, the tool is useful for developers in various fields, from videogames to machine learning algorithms .

Minikube is also aimed at IT administrators. CIOs typically don't have the time to develop, test, or learn new IT tools; something that, paradoxically, is essential due to the speed with which they evolve. There is no easier way to get familiar with Kubernetes than to stay up-to-date with Minikube . There is even a Minikube feature for the Kubernetes dashboard that provides a very detailed summary of application behavior across the cluster, including usage metrics. Also, Minikube is a perfect tool for introducing or displaying Kubernetes, which can be run locally.

A little introduction to the big world of Minikube

To install Minikube, it is enough to have a container system, such as Docker, or an environment with a virtual machine and the native kubectl command interface. Instructions for installing Minikube are included in the official Kubernetes documentation. Then, you just have to run the first command in kubectl:

  minikube start  

As you might expect, the requirements on the laptop or desktop are very affordable:

  • 2 CPUs or more
  • 2 GB of free memory
  • 20 GB of free hard disk space
  • Internet connection
  • Container management system or virtual machine

As soon as kubectl is installed, the new cluster can be named:

  kubectl get po -A  

Minikube groups the Kubernetes dashboard and allows easy access to the new environment.

  minikube dashboard  

Then you can get started with the deployment apps. The following command creates a deployment sample that is made available on port 8080:

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

With these commands, we use the predefined virtual environment echoserver . At this point, in principle, you can also use any other virtual environment, including yours.

The process can take a few seconds. When done, the implementation can be called with the following command:

  kubectl get services hello-minikube  

The easiest way to access this service is to have Minikube start a web browser:

  minikube service hello-minikube  

Alternatively, kubectl can also be used to redirect to port:

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

Finally, there are the following general management commands for clusters:

To pause Kubernetes without impacting deployed applications:

  minikube pause  

To stop the cluster:

  minikube stop  

To increase the standard memory limit (requires restart):

  minikube config set memory 16384  

To search for Kubernetes services:

  minikube addons list  

To create a second cluster with an older version of Kubernetes:

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

To remove all clusters from the Minikube:

  minikube delete --all  
advice

Do you want to know more about Kubernetes, the older brother of Minikube? In our comprehensive Kubernetes tutorial, you will find practical information on this topic.


...