Ubuntu 安装minikebe

 

1.下载并安装
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_1.5.2.deb \ && sudo dpkg -i minikube_1.5.2.deb

2.查看是否支持虚拟化

egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no
3.启动minikebe,需要网络下载
1)本地运行

sudo minikube start –vm-driver=none 2)使用vbox运行(不能使用root用户,vbox非不能用root)

minikube start --vm-driver=virtualbox 3)设置默认运行环境
sudo minikube config set vm-driver none
or
minikube config set vm-driver virtualbox

4)国内网络限制,使用aliyun的资源

minikube start --vm-driver=virtualbox --image-mirror-country=cn 
?  Ubuntu 18.04 上的 minikube v1.5.2
?  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
?  Starting existing virtualbox VM for "minikube" ...
⌛  Waiting for the host to be provisioned ...
⚠️  VM is unable to access k8s.gcr.io, you may need to configure a proxy or set --image-repository
?  正在 Docker '18.09.9' 中准备 Kubernetes v1.16.2…
?  Relaunching Kubernetes using kubeadm ... 
⌛  Waiting for: apiserver
?  完成!kubectl 已经配置至 "minikube"
?  为获得最佳结果,请安装 kubectl:https://kubernetes.io/docs/tasks/tools/install-kubectl/
4.查看状态minikube,连接ssh
key1088@key1088-Vostro-3459:~$ minikube status
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

key1088@key1088-Vostro-3459:~$ minikube ssh _ _ _ _ ( ) ( ) ___ ___ () ___ ()| |/‘) _ _ | |_ __ /‘ _ _| |/‘ _ \| || , &lt; ( ) ( )| '_\ /‘_\ | ( ) ( ) || || ( ) || || |\\ | () || |) )( _/ () (_) ()()() ()()() ()\___/'(_,__/'___)

$ exit

5.启动dashboard
添加PATH变量
export PATH=$PATH:$HOME/.minikube/cache/v1.16.2/ minikube dashboard

参考:https://minikube.sigs.k8s.io/docs/start/linux/