LoginSignup
4
5

More than 5 years have passed since last update.

OSX上にxhyveでminikubeを構築

Last updated at Posted at 2017-03-22

OSX上にminikubeを構築した際のメモ
xhyveを使ったほうがVirtualBoxより軽快な動作かなと思ったので、xhyveを使ってます。

Versions

OSX 10.11.6
minikube v0.17.1

xhyveとは

https://github.com/mist64/xhyve
OSX用のHypervisor。
VirtualBoxより動作が軽快?

Install xhyve driver

公式から引用 https://github.com/kubernetes/minikube/blob/master/DRIVERS.md#xhyve-driver

$ brew install docker-machine-driver-xhyve

# docker-machine-driver-xhyve need root owner and uid
$ 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

Install Kubernetes

公式から引用 https://kubernetes.io/docs/tasks/kubectl/install/

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl

Install minikube

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

Start minikube

--vm-driverでxhyveを指定

minikube start --vm-driver=xhyve

get nodes

get nodesをしてminikubeが動いているかを確認します。

kubectl get nodes

動いていれば下記のような結果が出力されるはずです。

NAME       STATUS    AGE
minikube   Ready     23h
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5