Skip to content

Instantly share code, notes, and snippets.

@inadarei
Last active October 20, 2020 01:57
Show Gist options
  • Save inadarei/7c4f4340d65b0cc90d42d6382fb63130 to your computer and use it in GitHub Desktop.
Save inadarei/7c4f4340d65b0cc90d42d6382fb63130 to your computer and use it in GitHub Desktop.
Minikube Setup: Docker for Mac / Sierra

Prerequisite: latest Docker for Mac on MacOS Sierra

$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
$ curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.0/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

$ minikube start --logtostderr --show-libmachine-logs --vm-driver=xhyve

If you are behind a proxy:

$ minikube start --docker-env HTTP_PROXY=$http_proxyT \
                 --docker-env HTTPS_PROXY=$https_proxy

where $http_proxy is full URI like http://proxy.example.com:8088

@Nowaker
Copy link

Nowaker commented Jan 8, 2018

Hyperkit is probably a better choice. Minikube offers ready-to-use binaries here: https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver

@identifysun
Copy link

modify minikube default driver to hyperkit, start minikube.

minikube start --vm-driver=hyperkit
minikube start

@rickelsum
Copy link

I have VMWare Fusion installed on my Mac would that be a better choice then hyper kit performance wise?

@bric3
Copy link

bric3 commented Jun 13, 2018

Now brew also has minikube and kubectl :

brew install kubernetes-cli
brew cask install minikube

Also the hyperkit driver has a formula pending approval : Homebrew/homebrew-core#28076

Also for reference as per PR kubernetes/minikube#894, the --show-libmachine-logs as been replaced by a verbosity level at least a level 3 --v=3.

@cumbreras
Copy link

minikube config set vm-driver hyperkit and enjoy.

@knurherb
Copy link

Hyperkit is probably a better choice. Minikube offers ready-to-use binaries here: https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver

Install hyperkit by running the install curl install commands,

minikube config set vm-driver hyperkit and enjoy.

And then running this command before deleting and restarting minikube.

@changtimwu
Copy link

everything is straightforward after minikube config set vm-driver hyperkit
MacOS Mojave 10.14.6

timwu@tirmbp~/Downloads: minikube stop
βœ‹  Stopping "minikube" in virtualbox ...
πŸ›‘  "minikube" stopped.
timwu@tirmbp~/Downloads: minikube config set vm-driver hyperkit
⚠️  These changes will take effect upon a minikube delete and then a minikube start
timwu@tirmbp~/Downloads: minikube delete
πŸ”₯  Deleting "minikube" in virtualbox ...
πŸ’”  The "minikube" cluster has been deleted.
timwu@tirmbp~/Downloads: minikube start
πŸ˜„  minikube v1.4.0 on Darwin 10.14.6
πŸ’Ύ  Downloading driver docker-machine-driver-hyperkit:
    > docker-machine-driver-hyperkit.sha256: 65 B / 65 B [---] 100.00% ? p/s 0s
    > docker-machine-driver-hyperkit: 28.85 MiB / 28.85 MiB  100.00% 5.11 MiB p
πŸ”‘  The 'hyperkit' driver requires elevated permissions. The following commands will be executed:

    $ sudo chown root:wheel /Users/timwu/.minikube/bin/docker-machine-driver-hyperkit 
    $ sudo chmod u+s /Users/timwu/.minikube/bin/docker-machine-driver-hyperkit 
Password:
πŸ”₯  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
🚜  Pulling images ...
πŸš€  Launching Kubernetes ... 
βŒ›  Waiting for: apiserver proxy etcd scheduler controller dns
πŸ„  Done! kubectl is now configured to use "minikube"

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