minikube---本地创建minikube

  • 安装 kubectl
    Minikube在不同操作系统上支持不同的驱动

  • macOS
    xhyve driver, VirtualBox 或 VMware Fusion

  • Linux
    VirtualBox 或 KVM
    NOTE: Minikube 也支持 –vm-driver=none 选项来在本机运行 Kubernetes 组件,这时候需要本机安装了 Docker
    Windows

  • VirtualBox 或 Hyper-V - 请参考下文
    注:
    由于minikube复用了docker-machine,在其软件包中已经支持了相应的VirtualBox, VMware Fusion驱动
    VT-x/AMD-v 虚拟化必须在 BIOS 中开启
    在Windows环境下,如果开启了Hyper-V,不支持VirtualBox方式
    Kubernetes 1.10 release

  • Mac OSX

curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v0.26.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
  • Linux
curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v0.26.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
  • Windows
    下载 minikube-windows-amd64.exe 文件,并重命名为 minikube.exe
    Kubernetes 1.9 release

  • Mac OSX

curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v0.25.2/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
  • Linux
curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v0.25.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
  • Windows
    下载 minikube-windows-amd64.exe 文件,并重命名为 minikube.exe

  • 自己构建
    也可以从Github上获取相应的项目自行构建。
    注:需要本地已经安装配置好 Golang 开发环境和Docke

git clone https://github.com/AliyunContainerService/minikube
cd minikube
git checkout aliyun-v0.25.0
make
sudo cp out/minikube /usr/local/bin/
  • 启动

缺省Minikube使用VirtualBox驱动来创建Kubernetes本地环境

minikube start --registry-mirror=https://registry.docker-cn.com
  • 打开Kubernetes控制台
    minikube dashboard

关于GFW问题:

$ docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kube-addon-manager-amd64:v6.3
$ docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kube-addon-manager-amd64:v6.3 gcr.io/google-containers/kube-addon-manager:v6.3

$ docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kubernetes-dashboard-amd64:v1.5.1
$ docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kubernetes-dashboard-amd64:v1.5.1 gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.1

$ docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/kubedns-amd64:1.9
$ ocker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kubedns-amd64:1.9 gcr.io/google_containers/kubedns-amd64:1.9

$ docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kube-dnsmasq-amd64:1.4
$ docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kube-dnsmasq-amd64:1.4 gcr.io/google_containers/kube-dnsmasq-amd64:1.4

$ docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/exechealthz-amd64:1.2
$ docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/exechealthz-amd64:1.2 gcr.io/google_containers/exechealthz-amd64:1.2

$ docker pull registry.cn-hangzhou.aliyuncs.com/google-container/echoserver:1.4
$ docker tag  registry.cn-hangzhou.aliyuncs.com/google-container/echoserver:1.4 gcr.io/google_containers/echoserver:1.4

$ docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0
$ docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0 gcr.io/google_containers/pause-amd64:3.0
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页