服务器内存过剩?装个Kubernetes吧

系统环境:Ubuntu 18.04
docker 19.03

安装 VirtualBox

添加软件源:/etc/apt/sources.list

deb https://download.virtualbox.org/virtualbox/debian bionic contrib

添加密钥

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

安装 virtualbox 6.1

sudo apt-get update
sudo apt-get install virtualbox-6.1

安装 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

sudo mv kubectl /usr/local/bin/

安装 MiniKube

sudo curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && sudo chmod +x minikube && sudo mv minikube /usr/local/bin/

运行

这里的安装速度挺慢的,安装完成后大概是以下这些输出

然后执行
sudo minikube dashboard

会在浏览器中打开控制面板

整个安装过程基本没有坑,官方文档也挺详细的

有个权限问题:sudo chmod +x /usr/local/bin/kubectl