> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Kubernetes Locally

> A basic tutorial on how to run Kubernetes locally using Minikube.

This tutorial guides you through setting up a local Kubernetes cluster using Minikube, with a focus on exposing services using LoadBalancer and the essential `minikube tunnel`.

***

## Prerequisites

Before you begin, ensure you have the following installed:

* A supported hypervisor or container runtime:
  * [Docker](https://docs.docker.com/get-docker/)
  * [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
  * [Hyper-V](https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/)
  * [KVM](https://www.linux-kvm.org/page/Downloads)
  * [Podman](https://podman.io/getting-started/installation)
* [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) (Kubernetes command-line tool)

***

## Installation

### Minikube

<Tabs>
  <Tab title="macOS">
    ```bash theme={null}
    brew install minikube
    ```
  </Tab>

  <Tab title="Linux">
    ```bash theme={null}
    curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
    sudo install minikube-linux-amd64 /usr/local/bin/minikube
    ```
  </Tab>

  <Tab title="Windows">
    Download the [Windows installer](https://github.com/kubernetes/minikube/releases/latest/download/minikube-installer.exe) and run it, or use Chocolatey:

    ```powershell theme={null}
    choco install minikube
    ```
  </Tab>
</Tabs>

For other installation methods, refer to the [official Minikube documentation](https://minikube.sigs.k8s.io/docs/start/).

***

### Installing kubectl

<Tabs>
  <Tab title="macOS">
    ```bash theme={null}
    brew install kubectl
    ```
  </Tab>

  <Tab title="Linux">
    ```bash theme={null}
    sudo apt-get update
    sudo apt-get install -y kubectl
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    choco install kubernetes-cli
    ```
  </Tab>
</Tabs>

For other installation methods, visit the [official kubectl installation guide](https://kubernetes.io/docs/tasks/tools/install-kubectl/).

***

## Starting Your Local Cluster

<Tabs>
  <Tab title="macOS / Linux">
    ```bash theme={null}
    minikube start
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    minikube start
    ```
  </Tab>
</Tabs>

This command will initialize a new Kubernetes cluster in your local environment. The process may take a few minutes as it downloads the necessary components and sets up the virtual machine.

***

## Connecting Ankra to Your Local Cluster

To begin deploying services through Ankra, you need to import your Minikube cluster into the platform by connecting the Ankra Agent to your local cluster.

1. Navigate to the **Clusters** tab in the Ankra UI.
2. Click **Import Cluster**.
3. Enter the **Cluster Name**.
4. Connect a **GitHub Credential** and select a GitHub repository.
   * The chosen repository will be where Ankra stores the YAML configuration files for the services deployed onto your local cluster from the Ankra Library.
5. Run the Helm command provided in the Ankra UI to connect the Ankra Agent to your local cluster.
6. Once your cluster is imported, you will be able to view the cluster dashboard and begin [installing add-ons](/concepts/addons).

***

> **Optional:** If your services will be of type `LoadBalancer`, you will need to start the Minikube tunnel by running the following command in a separate terminal to provide them with a public IP address:

<Tabs>
  <Tab title="macOS / Linux">
    ```bash theme={null}
    minikube tunnel
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    minikube tunnel
    ```
  </Tab>
</Tabs>

***
