Wednesday, March 3, 2021

How to Install Minikube

 Minikube is a great tool for running Kubernetes locally on your machine. Let’s walk through the setup step by step.

What You Need First

  1. Hypervisor: Minikube needs a virtual machine (VM) to run Kubernetes. You can use VirtualBox, VMware, Hyper-V (for Windows), or Docker. Make sure you’ve got one of these installed.

  2. kubectl: This is the command-line tool for Kubernetes. You can get it from the Kubernetes website.

Installation Steps

  1. Get Minikube

    • On Windows:

      1. Download the Minikube executable from the Minikube GitHub releases page. Look for minikube-windows-amd64.exe.
      2. Rename the file to minikube.exe and put it in a folder that's in your system’s PATH, like C:\Program Files\.
    • On macOS:

      1. The easiest way is to use Homebrew. Open a terminal and run:
        brew install minikube
    • On Linux:

      1. Download the Minikube binary:

        curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
      2. Make it executable:

        chmod +x minikube-linux-amd64
      3. Move it to a directory in your PATH:

        sudo mv minikube-linux-amd64 /usr/local/bin/minikube
  2. Start Minikube

    • Open your terminal or command prompt.

    • To start Minikube, use the driver that matches your setup. For example, with VirtualBox:


      minikube start --driver=virtualbox

      Or with Docker:


      minikube start --driver=docker
    • Minikube will now download and set up a virtual machine with Kubernetes. This might take a few minutes.

  3. Check Everything’s Running

    • To see if Minikube is up and running:


      minikube status
    • Verify that kubectl is set up to work with Minikube:


      kubectl cluster-info
    • You should see info about your Kubernetes cluster.

  4. Optional: Open the Kubernetes Dashboard

    Minikube includes a handy dashboard. To open it in your web browser, run:


    minikube dashboard

Extra Tips

  • Updating Minikube: To check for updates, run:


    minikube update-check
  • Stopping Minikube: When you’re done, you can stop it with:


    minikube stop
  • Deleting Minikube: To remove the VM and everything associated with it:

    minikube delete

And that’s it! You should now have Minikube up and running. If you hit any snags, the Minikube documentation and community are great resources.

No comments:

Post a Comment