minikube的官网地址:Welcome! | minikube (k8s.io)
minikube是什么?
Minikube是一个单机版的kubernetes集群。可以在windows、mac、linux 快速的创建一个kubernetes集群,它可以帮助想了解kubernetes的人员快速上手。
里面有minikube的介绍及如何安装。首先我们先安装minikube,在"Get Started!"页面找到installation,可以看到支持的操作系统包含有Linux、Macos、Windows。我本地的服务器是Windows。
New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force Invoke-WebRequest -OutFile 'c:\minikube\minikube.exe' -Uri 'https://github.com/kubernetes/minikube/releases/latest/download/minikube-windows-amd64.exe' -UseBasicParsing
执行之后记得把相关路径添加到环境变量里面,之后在访问执行的时候会方便很多。
提示报错StartHost failed, but will try again: creating host: create: precreate: Hyper-V PowerShell Module is not available。网上搜索结果,说是需要安装 Hyper-V PowerShell 模块。
上面显示启动hyperv驱动,启动控制面板,创建 一个(2核,2.2G,20G)的虚拟机。然后正在准备虚拟机环境,这个过程有点慢需要等待一会,在漫长的过程中等待,最后显示安装kube的时候出现超时的问题,于是就把镜像地址换成中文地址,如下:
minikube.exe start --image-mirror-country='cn'
执行一下看看,效果如何。