Skip to content

Latest commit

 

History

History
128 lines (90 loc) · 2.25 KB

1.minikube-setup.md

File metadata and controls

128 lines (90 loc) · 2.25 KB

Setup local env for Mac

https://minikube.sigs.k8s.io/docs/

Mac

Install docker

$ brew install docker

Install Hypervisor

Install hyperkit https://minikube.sigs.k8s.io/docs/drivers/hyperkit/

$ git clone https://github.com/moby/hyperkit.git
$ cd hyperkit
$ make
$ cp ./build/hyperkit /usr/local/bin/hyperkit

For MacOS

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

Config minikube

$ minikube config set driver hyperkit

Start minikube

$ minikube start \
    --cpus=8 \
    --v=4 \
    --memory=8192 \
    --network-plugin=cni \
    --enable-default-cni \
    --bootstrapper=kubeadm \
    --kubernetes-version v1.18.3 \
    --image-mirror-country=cn \
    --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers

Install kubectl

Download kubectl for Mac, unzip and put into your OS path

$ curl -LO https://dl.k8s.io/v1.18.6/kubernetes-client-darwin-amd64.tar.gz

Setup local env for Linux

https://minikube.sigs.k8s.io/docs/

Install docker

Ubuntu:

$ sudo apt-get install docker.io

CentOS:

$ sudo yum install docker-ce

Install VMtool

For Linux

Install VirtualBox, access and find right version for your OS

https://www.virtualbox.org/wiki/Linux_Downloads

For Linux

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
  && chmod +x minikube
sudo install minikube /usr/local/bin/

Config minikube

$ minikube config set driver virtualbox

Start minikube

$ minikube start \
    --cpus=8 \
    --v=4 \
    --memory=8192 \
    --network-plugin=cni \
    --enable-default-cni \
    --bootstrapper=kubeadm \
    --kubernetes-version v1.18.3 \
    --image-mirror-country=cn \
    --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers

Install kubectl

Download kubectl for Linux

$ curl -LO  https://dl.k8s.io/v1.18.6/kubernetes-client-linux-amd64.tar.gz