官方網址:你好,Minikube | Kubernetes你好,Minikube | Kubernetes
1、安裝minikube
不知道為何,我參照官網使用powershell指令行方式安裝,沒有成功,我就下載下傳了exe安裝。這把成功了。下載下傳之後的安裝檔案如下圖:
2、執行minikube start
報錯“Enable-WindowsOptionalFeature : 功能名稱 Microsoft-Hyper-V”,百度了一下。
(1)将下列代碼儲存為Hyper-V.cmd
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
(2)使用管理者權限安裝
此時會下載下傳一些更新檔,耐心等待即可。
哈。此處沒有截圖。
(3)打開控制台,確定開通Hyper-V
(4)完成重新開機
3、管理者權限進入shell,執行nimikube start
kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
,此時會提示沒有kubectl,安裝kubectl。
其它方法可以參考:安裝工具 | Kubernetes
至此,結束安裝。