安装docker
https://docs.docker.com/install/linux/docker-ce/ubuntu/
创建用户
adduser newuser
安装kvm2
参考:https://help.ubuntu.com/community/KVM/Installation
安装kvm2
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
加入用户组
sudo adduser `id -un` libvirtd
sudo usermod -a -G libvirtd $(whoami)
sudo useradd -G docker $(whoami)
安装驱动
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 && chmod +x docker-machine-driver-kvm2 && sudo mv docker-machine-driver-kvm2 /usr/local/bin/
sudo ls -la /var/run/libvirt/libvirt-sock
newgrp libvirtd
newgrp docker
reboot
安装kubectl
sudo snap install kubectl --classic
安装minikube
curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.4.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
创建k8s
minikube start --image-mirror-country=cn --iso-url=https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.5.0.iso --registry-mirror=https://registry.docker-cn.com --vm-driver=kvm2
开启Kubernetes控制台
minikube dashboard
最后给大家附上2022最新面试题~(shimo.im/docs/TYDFhtqVh2Ar96ub/ )
祝大家拿到高薪offer~