#所有节点
vim /etc/sysconfig/docker
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --registry-mirror=https://registry.docker-cn.com --insecure-registry=192.168.0.101:5000'
systemctl restart docker
#master节点
上传registry.tar.gz
docker run -d -p 5000:5000 --restart=always --name registry -v /opt/myregistry:/var/lib/registry registry
docker load -i docker_nginx1.15.tar.gz
docker tag docker.io/nginx:latest 192.168.0.101:5000/nginx:1.15
docker push 192.168.0.101:5000/nginx:1.15
原来的pod和现rc文件对比
实现10秒滚动升级
kubectl rolling-update nginx -f k8s_rc2.yaml --update-period=10s
回滚
kubectl rolling-update nginx2 -f k8s_rc.yaml --update-period=1s