学习的新起点
[安装参考][1]
镜像源使用mirrorgooglecontainers,这个大神同步了gcr.io的镜像,无比感谢!
镜像脚本:
#!/bin/bash
images=(kube-proxy-amd64:v1.9.6 kube-scheduler-amd64:v1.9.6 kube-controller-manager-amd64:v1.9.6 kube-apiserver-amd64:v1.9.6 etcd-amd64:3.1.11 pause-amd64:3.0 kubernetes-dashboard-amd64:v1.8.3 k8s-dns-sidecar-amd64:1.14.7 k8s-dns-kube-dns-amd64:1.14.7 k8s-dns-dnsmasq-nanny-amd64:1.14.7)
for imageName in ${images[@]} ; do
docker pull mirrorgooglecontainers/$imageName
docker tag mirrorgooglecontainers/$imageName gcr.io/google_containers/$imageName
docker rmi mirrorgooglecontainers/$imageName
done
注意:
- docker0的IP在安装完docker后需要修改,修改/etc/docker/daemon.json文件,尽量不一样
- swapon -s查看swap分区启动情况,swapoff /dev/dm-1关闭swap分区
- 防火墙必须关闭否则容器之间无法互通,systemctl stop firewalld & systemctl disable firewalld
[1]: https://www.kubernetes.org.cn/3357.html