一、安裝 WSL Ubuntu
1、首先 Windows Microsoft Store 安裝 Ubuntu。
(資料圖片)
2、解決報(bào)錯(cuò):
1、未安裝 WSL 支持
WslRegisterDistribution failed with error: 0x8007019e
Installing, this may take a few minutes...Installation Failed!Error: 0x8007019ePress any key to continue...
解決方案:
打開(kāi) Windows PowerShell(管理員),輸入如下命令后重啟:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
2、WSL 內(nèi)核未升級(jí)
WslRegisterDistribution failed with error: 0x800701bc
解決方案:
下載最新 WSL 安裝包,直接運(yùn)行安裝。
3、沒(méi)有開(kāi)啟虛擬化
WslRegisterDistribution failed with error: 0x80370102
解決方案:
打開(kāi)控制面板->程序->啟用或關(guān)閉Windows功能,勾選虛擬機(jī)平臺(tái)選項(xiàng),確定后重啟電腦。
二、安裝Docker
執(zhí)行如下命令即可:
1 sudo apt update2 sudo apt upgrade3 sudo apt install apt-transport-https ca-certificates curl software-properties-common4 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -5 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"6 sudo apt update7 apt-cache policy docker-ce8 sudo apt install docker-ce9 sudo service docker start
三、minikube 簡(jiǎn)易安裝 K8S
1、安裝 minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64sudo install minikube-linux-amd64 /usr/local/bin/minikubeminikube start
2、解決報(bào)錯(cuò)
1、沒(méi)有健康的環(huán)境
Exiting due to DRV_NOT_HEALTHY: Found driver(s) but none were healthy. See above for suggestions how to fix installed drivers.
解決方案:將當(dāng)前用戶(hù)添加進(jìn) Docker 組
sudo usermod -aG docker $USER && newgrp docker
2、源鏡像被墻了,但有可替代源。
minikube was unable to download gcr.io/k8s-minikube/kicbase:v0.0.39, but successfully downloaded docker.io/kicbase/stable:v0.0.39 as a fallback image
解決方案:不用管
四、美化 Windows 的 CMD、PowerShell 界面
Windows Microsoft Store 搜索 Windows Terminal、PowerShell 進(jìn)行安裝即可
五、參考文獻(xiàn)
https://blog.csdn.net/qq_37085158/article/details/125172803
https://blog.csdn.net/weixin_51617086/article/details/125235258
https://minikube.sigs.k8s.io/docs/start/
https://zhuanlan.zhihu.com/p/559328777
https://blog.csdn.net/weixin_45574790/article/details/121419814
標(biāo)簽: