Minikube Page

Minikube



Return to Kubernetes, kubectl, KiND, Docker

Minikube is a powerful tool that simplifies the process of setting up and running a single-node Kubernetes cluster directly on your local machine. By creating a virtual machine (VM) or utilizing a container runtime like Docker, Minikube provides a convenient and accessible way to experiment with Kubernetes, develop applications, and test deployments without the need for a full-fledged, multi-node cluster.

Key Features



* **Single-Node Kubernetes Cluster:** Minikube encapsulates an entire Kubernetes cluster, including a master node and a worker node, within a single VM or container. This eliminates the complexities of setting up multiple machines and configuring networking between them.
* **Local Development and Testing:** It's an ideal solution for developers who want to experiment with Kubernetes locally, build and test containerized applications, or try out new Kubernetes features without impacting production environments.
* **Easy Installation and Setup:** Minikube is designed to be easy to install and configure, with a simple command-line interface (CLI) for starting, stopping, and interacting with the cluster.
* **Addons:** Minikube supports a wide range of addons that extend its functionality, such as ingress controllers, service meshes, monitoring tools, and more.
* **Multi-Platform Support:** Minikube is available for multiple operating systems, including Linux, macOS, and Windows, providing flexibility and accessibility for developers on different platforms.

Benefits



* **Simplified Learning and Development:** Minikube provides a low-friction environment for learning Kubernetes concepts and developing applications directly on your local machine.
* **Rapid Prototyping:** It allows you to quickly iterate and test your Kubernetes deployments, accelerating development cycles.
* **Cost-Effective:** Minikube eliminates the need for cloud resources or dedicated hardware for local development and testing.
* **Easy to Install and Manage:** Its simple installation process and intuitive CLI make it easy to get started and manage your cluster.
* **Extensible:** The addon system provides a way to extend Minikube's functionality with additional tools and features.

Code Examples



1. **Starting Minikube:**

```bash
minikube start
```

This command launches a Minikube cluster, creating a VM (or using a container runtime) and configuring the necessary Kubernetes components.

2. **Accessing the Kubernetes Dashboard:**

```bash
minikube dashboard
```

This command opens the Kubernetes dashboard in your default web browser, providing a graphical interface for interacting with the cluster.

3. **Enabling an Addon:**

```bash
minikube addons enable ingress
```

This command enables the ingress addon, which provides an ingress controller for exposing services outside the cluster.

Additional Resources



* **Minikube Official Website:** [https://minikube.sigs.k8s.io/](https://minikube.sigs.k8s.io/)
* **Minikube GitHub Repository:** [https://github.com/kubernetes/minikube](https://github.com/kubernetes/minikube)
* **Minikube Documentation:** [https://minikube.sigs.k8s.io/docs/](https://minikube.sigs.k8s.io/docs/)





minikube quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows. We proudly focus on helping Kubernetes application developers and new Kubernetes users.


Highlights


* Supports the latest Kubernetes release (+6 previous minor versions)
* Cross-platform (Kubernetes on Linux, Kubernetes on macOS, Kubernetes on Windows)
* Deploy Kubernetes] as a VM, a container, or on bare-metal
* Multiple container runtimes (CRI-O, containerd, docker)
* Docker API endpoint for blazing fast docker image pushes
* Advanced features such as LoadBalancer, Kubernetes filesystem mounts, and FeatureGates
* Minikube Addons for easily installed Kubernetes applications
* Supports common CI environments

* https://minikube.sigs.k8s.io/docs

ddg>minikube provisions and manages local Kubernetes clusters optimized for
development workflows.

Basic Minikube Commands:
* start Starts a local Kubernetes cluster
* status Gets the status of a local Kubernetes cluster
* stop Stops a running local Kubernetes cluster
* delete Deletes a local Kubernetes cluster
* dashboard Access the Kubernetes dashboard running within the [[minikube
cluster]]
* pause pause Kubernetes
* unpause unpause Kubernetes

Minikube Images Commands:
* docker-env Configure environment to use minikube's Docker daemon
* podman-env Configure environment to use minikube's Podman service
* cache Add, delete, or push a local image into minikube
* image Manage images

Minikube Configuration and Management Commands:
* addons Enable or disable a minikube addon
* config Modify persistent configuration values
* profile Get or list the current profiles (clusters)
* update-context Update kubeconfig in case of an IP or port change

Minikube Networking and Connectivity Commands:
* service Returns a URL to connect to a service
* tunnel Connect to LoadBalancer services

Advanced Minikube Commands:
* mount Mounts the specified directory into minikube
* ssh Log into the minikube environment (for debugging)
* kubectl Run a kubectl binary matching the cluster version
* node Add, remove, or list additional nodes
* cp Copy the specified file into minikube

Minikube Troubleshooting Commands:
* ssh-key Retrieve the ssh identity key path of the specified node
* ssh-host Retrieve the ssh host key of the specified node
* ip Retrieves the IP address of the specified node
* logs Returns logs to debug a local Kubernetes cluster
* update-check Print current and latest version number
* version Print the version of minikube

Other Commands:
* completion Generate command completion for a shell

Use "minikube --help" for more information about a given Minikube command.