Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

minikube

References

CLI

Installation

macOS

curl -L https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 -o /usr/local/bin/minikube
chmod +x /usr/local/bin/minikube

Linux

sudo curl -L https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 -o /usr/local/bin/minikube
sudo chmod +x /usr/local/bin/minikube

Chocolatey

choco install -y minikube

Commands

minikube --help

Start

HyperKit
minikube start \
  $(echo $MINIKUBE_START_OPTS) \
  --cpus 4 \
  --disk-size 40g \
  --host-only-cidr '10.100.1.1/24' \
  --memory 8192 \
  --vm-driver hyperkit

Addons

minikube addons list

Tunnel

minikube tunnel

# this approach may not work as expected
minikube tunnel --log_dir /tmp > /dev/null 2>&1 &
Kill Process
sudo pidof -k minikube
Clear Logs
sudo rm /tmp/minikube.*

Environment

eval "$(minikube docker-env)"

Configuration

Network

Proxy
jq ".HostOptions.EngineOptions.Env[0] |= \"http_proxy=$http_proxy\"" ~/.minikube/machines/minikube/config.json | sponge ~/.minikube/machines/minikube/config.json
jq ".HostOptions.EngineOptions.Env[1] |= \"https_proxy=$https_proxy\"" ~/.minikube/machines/minikube/config.json | sponge ~/.minikube/machines/minikube/config.json
jq ".HostOptions.EngineOptions.Env[2] |= \"no_proxy=$no_proxy\"" ~/.minikube/machines/minikube/config.json | sponge ~/.minikube/machines/minikube/config.json
minikube stop
minikube start --vm-driver hyperkit
docker info | grep Proxy

Issues

Route Conflict

E0729 13:29:35.162550 91854 tunnel.go:50] error cleaning up: conflicting rule in routing table: 10.96/12 192.168.64.16 UGSc 0 0 bridge1

route -n get 10.96/12
sudo route delete -net 10.96/12
minikube tunnel -c

Locked VirtualBox VM

ps -ef | grep -i VBoxHeadless
kill -9 [PID]

Uninstall

sudo rm -fR /usr/local/bin/minikube
rm -fR ~/.minikube
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.