1. Preparations
-
Drivers used by Linux
- VirtualBox or KVM
- NOTE: Minikube also supports the
--vm-driver=none
option to run Kubernetes components locally, in this case, Docker needs to be installed locally
- Since minikube reuses docker-machine, the corresponding VirtualBox and VMware Fusion drivers are already supported in its software package
- VT-x/AMD-v virtualization must be enabled (currently supported by default in virtual machines)
2. Download the virtualbox driver
yum install VirtualBox-5.2
Small pit:
After downloading, you may also need to build the kernel module, please use the command yum install kernel-devel first and then use /sbin/vboxconfig to rebuild.
3. Anthropomorphic Mini Kube
wget http://029145.oss-cn-hangzhou.aliyuncs.com/minikube-linux-amd64
mv minikube-linux-amd64 minikube
chmod u+x minikube
sudo mv minikube /usr/local/bin/
4. Install Kubectl
wget http://029145.oss-cn-hangzhou.aliyuncs.com/kubectl
chmod u+x kubectl
sudo mv kubectl /usr/local/bin/
5. Dynamic MiniKube
minikube start
Download dependent mirrors
Since this process needs to download the mirror, the mirror is outside the wall, use the mirror provided by Ali
docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0
docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0 gcr.io/google_containers/pause-amd64:3.0
docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kube-addon-manager-amd64:v6.1
docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kube-addon-manager-amd64:v6.1 gcr.io/google-containers/kube-addon-manager:v6.1
docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kubedns-amd64:1.9
docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kubedns-amd64:1.9 gcr.io/google_containers/kubedns-amd64:1.9
docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kube-dnsmasq-amd64:1.4
docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kube-dnsmasq-amd64:1.4 gcr.io/google_containers/kube-dnsmasq-amd64:1.4
docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/exechealthz-amd64:1.2
docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/exechealthz-amd64:1.2 gcr.io/google_containers/exechealthz-amd64:1.2
docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kubernetes-dashboard-amd64:v1.5.0
docker tag registry.cn-hangzhou.aliyuncs.com/google-containers/kubernetes-dashboard-amd64:v1.5.0 gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.1
So far, the cluster has been built
Reference articles:
https://yq.aliyun.com/articles/225023?spm=a2c4e.11153959.blogcont88526.32.71dfb5e8idxL1X
http://blog.csdn.net/hipihi_0/article/details/6238190
https://yq.aliyun.com/articles/221687