參考文章
K8S中文文檔
Install-minikube
Ali國內(nèi)安裝步驟(!)
Minikube Git Repo
基本信息(OS)
ubuntu 18.04
必要安裝:kvm2-driver
- 安裝必須軟件
- Debian or Ubuntu 18.x:
sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm
sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service
sudo systemctl status libvirtd.service
sudo usermod -a -G libvirt $(whoami)
newgrp libvirt
- 安裝kvm-driver:
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2
&& sudo install docker-machine-driver-kvm2 /usr/local/bin/
安裝minikube
$curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.0.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- To use the kvm2 driver:
$ minikube start --vm-driver kvm2
- To use kvm2 as a default driver and run minikube as usual:(國內(nèi)源):
$ minikube config set vm-driver kvm2
$ minikube start --registry-mirror=https://registry.docker-cn.com
- 關(guān)于minikube start后卡住的問題排查
minikube-docker-image中也需要開代理
安裝kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
- 配置kubectl代碼自動補全
source <(kubectl completion bash)
并將上述語句添加到~./bashrc文件中