Skip to content

Instantly share code, notes, and snippets.

@naveensrinivasan
Last active May 5, 2017 15:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save naveensrinivasan/d4e1c609989520ea5a99ccc2f2aedb38 to your computer and use it in GitHub Desktop.
Save naveensrinivasan/d4e1c609989520ea5a99ccc2f2aedb38 to your computer and use it in GitHub Desktop.
minikube

Setting up minikube for development

Minikube lets you simulate a cluster using virtualbox locally. It can be used to test and debug locally instead of the cloud.

Prerequisites

These prerequisites that are required to run minikube are

  • Docker
  • kubectl
  • virtualbox
  • blackbox
  • helm

Installing

Instructions available OSX and Ubuntu.

Installing on OSX

The following instructions assume you have homebrew installed.

Install prerequisites

brew cask install docker
brew cask install virtualbox
brew install kubectl
brew install blackbox
brew install kubernetes-helm

Install minikube

brew cask install minikube

Alternatively you can manually install from github.com/kubernetes/minikube.

Installing on Ubuntu 16.04

Note: If you're installing virtualbox onto linux running in virtualbox, it may complain that your processor doesn't have VT-x/AMD-V enabled. I'm sure there's a fix if your processor does indeed support it but it is not documented here.

Note: Running VMs on VMs is tricky in general. These instructions should work but are not tested on a bare metal linux machine. Minikube is meant to be a local testing environment.

Install virtualbox

sudo apt install -y virtualbox

Install kubectl

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

Install blackbox

git clone https://github.com/StackExchange/blackbox.git
cd blackbox
make manual-install

Install minikube

This is version 17, you may want to check to see if there is a newer version here. If there is, please update this document.

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.17.1/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Docker config

To get some visibility on the actual images and containers running in minikube you can use eval $(minikube docker-env) after starting minikube. This will redirect the docker daemon to the one running in minikube. Once this is done all docker commands run will act on the install of docker running in minikube.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment