# Installation MiniKube

## **Installing Minikube**

In this lesson, we will walk through the process of installing Minikube on different operating systems—Windows, macOS, and Linux. By the end of this lesson, you will have Minikube installed and ready to run your first local Kubernetes cluster.

## **1. Downloading and Installing Minikube**

Minikube can be installed using package managers, directly via a downloadable binary, or through other methods specific to your operating system.

***

### **Installing Minikube on Windows:**

**Step 1: Install a Hypervisor**

* Ensure that Hyper-V or another supported hypervisor (like VirtualBox or Docker) is installed and enabled.
* If using Hyper-V:
  * Enable Hyper-V via the "Windows Features" menu.
  * Restart your machine if required.

**Step 2: Download Minikube**

* Open PowerShell or Command Prompt as an Administrator.
* Run the following command to download and install Minikube:

  ```bash
  choco install minikube
  ```

  * If you don't have Chocolatey installed, you can download the Minikube binary directly from the [official Minikube releases page](https://github.com/kubernetes/minikube/releases) and add it to your PATH.

**Step 3: Verify Installation**

* After installation, verify that Minikube is installed by running:

  ```bash
  minikube version
  ```

  * This command should display the version of Minikube installed on your system.

***

### **Installing Minikube on macOS:**

**Step 1: Install a Hypervisor**

* You can use Docker Desktop, HyperKit, or VirtualBox. Docker Desktop is recommended as it integrates well with Minikube.
* Install Docker Desktop by downloading it from the Docker website.

**Step 2: Install Minikube via Homebrew**

* Open your Terminal and run the following command to install Minikube using Homebrew:

  ```bash
  brew install minikube
  ```

  * If you don’t have Homebrew installed, you can install it from [brew.sh](https://brew.sh/), or download the Minikube binary directly from the [official Minikube releases page](https://github.com/kubernetes/minikube/releases) and add it to your PATH.

**Step 3: Verify Installation**

* Verify that Minikube is installed by running:

  ```bash
  minikube version
  ```

  * This command should show the installed Minikube version.

***

### **Installing Minikube on Linux:**

**Step 1: Install a Hypervisor**

* KVM, VirtualBox, or Docker are common choices for Linux. For high performance, KVM is recommended.
* To install KVM, run the following commands:

  ```bash
  sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
  sudo apt-get install virt-manager
  sudo systemctl enable libvirtd
  sudo systemctl start libvirtd
  ```

**Step 2: Download and Install Minikube**

* You can install Minikube using a package manager or by downloading the binary.

  **Using a Package Manager (Debian/Ubuntu):**

  ```bash
  curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
  sudo dpkg -i minikube_latest_amd64.deb
  ```

  **Using Binary Download:**

  * Download the latest release of Minikube from the [official releases page](https://github.com/kubernetes/minikube/releases) and install it:

  ```bash
  Curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
  sudo install minikube-linux-amd64 /usr/local/bin/minikube
  ```

**Step 3: Verify Installation**

* Check that Minikube is properly installed by running:

  ```bash
  minikube version
  ```

  * This command will display the installed Minikube version.

***

## **2. Starting Your First Minikube Cluster**

After installing Minikube, the next step is to start your first Kubernetes cluster.

### **Step 1: Start Minikube**

* Open your terminal or command prompt and start Minikube by running:

  ```bash
  minikube start
  ```

  * This command will create and start a local Kubernetes cluster. By default, Minikube will choose the best virtualization option based on your system.

### **Step 2: Verify the Cluster is Running**

* To check if your cluster is running correctly, use the following command:

  ```bash
  kubectl get nodes
  ```

  * You should see a single node listed, indicating that Minikube has successfully started the cluster.

***

## **3. Accessing the Minikube Dashboard**

Minikube comes with a built-in Kubernetes dashboard that provides a web-based UI to interact with your cluster.

### **Step 1: Launch the Dashboard**

* To launch the dashboard, run:

  ```bash
  minikube dashboard
  ```

  * This command will open the Kubernetes dashboard in your default web browser.

### **Step 2: Explore the Dashboard**

* Use the dashboard to explore various Kubernetes components like Pods, Deployments, and Services. The dashboard is a great tool for visualizing and managing your cluster.

***

## **4. Stopping and Deleting Minikube**

If you want to stop the Minikube cluster or delete it altogether:

### **Step 1: Stop Minikube**

* To stop the Minikube cluster without deleting it, run:

  ```bash
  minikube stop
  ```

### **Step 2: Delete Minikube**

* To delete the Minikube cluster, use:

  ```bash
  minikube delete
  ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cthfm-k8s.gitbook.io/kubernetes/kubernetes-fundamentals/minikube/installation-minikube.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
