minikube

Minikube

Return to Kubernetes, kubectl, KiND, Docker

minikube is a tool that allows users to run a local Kubernetes cluster on their development machine. Minikube is often used for testing and development purposes, providing a simple environment to simulate Kubernetes deployments without needing a full production cluster.

https://formulae.brew.sh/formula/minikube

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

Highlights

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:

Minikube Networking and Connectivity Commands:

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 <command> --help” for more information about a given Minikube command.

minikube.txt · Last modified: 2025/02/01 06:41 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki