docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.25.1
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.25.1 quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.25.1
docker rmi registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.25.1
docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.20.0
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.20.0 quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.20.0
docker rmi registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.20.0
docker pull googlecontainer/defaultbackend-amd64:1.5
docker tag googlecontainer/defaultbackend-amd64:1.5 k8s.gcr.io/defaultbackend-amd64:1.5
docker rmi googlecontainer/defaultbackend-amd64:1.5
docker tag registry.cn-qingdao.aliyuncs.com/kubernetes_xingej/defaultbackend-amd64:1.5 k8s.gcr.io/defaultbackend-amd64:1.5
docker rmi registry.cn-qingdao.aliyuncs.com/kubernetes_xingej/defaultbackend-amd64:1.5
docker pull quay-mirror.qiniu.com/coreos/flannel:v0.12.0-amd64
docker tag quay-mirror.qiniu.com/coreos/flannel:v0.12.0-amd64 quay.io/coreos/flannel:v0.12.0-amd64
docker rmi quay-mirror.qiniu.com/coreos/flannel:v0.12.0-amd64

导出镜像

docker save -o nginx-ingress-controller_0.20.0.tar quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.20.0
docker save -o defaultbackend-amd64_1.5.tar k8s.gcr.io/defaultbackend-amd64:1.5
docker save -o metrics-scraper_v1.0.4.tar kubernetesui/metrics-scraper:v1.0.4
docker save -o dashboard_v2.0.0-rc6.tar kubernetesui/dashboard:v2.0.0-rc6
docker save -o flannel_v0.12.0-amd64.tar quay.io/coreos/flannel:v0.12.0-amd64
docker save -o obpm-runtime-consul.tar obpm-runtime-consul

导入镜像

docker load --input nginx-ingress-controller_0.20.0.tar
docker load --input defaultbackend-amd64_1.5.tar
docker load --input metrics-scraper_v1.0.4.tar
docker load --input dashboard_v2.0.0-rc6.tar
docker load --input flannel_v0.12.0-amd64.tar
docker load --input obpm-runtime-consul.tar

加入节点

kubeadm join 192.168.1.12:6443 --token q53f5n.66wum4l6hcr9ulat     --discovery-token-ca-cert-hash sha256:294d2f34772c58e38a53de5b818d9d9719c94163b491cc44e886bde3290f4358

删除节点 - 主节点执行

kubectl delete node2

删除节点 - node2上执行:

注意:如果你使用的是外部etcd,你需要手动删除etcd数据,这意味着如果使用相同的etcd端点再次运行kubeadm init,您将看到先前集群的状态。

kubeadm reset
ifconfig cni0 down
ip link delete cni0
ifconfig flannel.1 down
ip link delete flannel.1
rm -rf /var/lib/cni/

允许调度主节点master1(好像不起作用)

kubectl taint node master1 node-role.kubernetes.io/master-

如果要恢复Master Only状态(好像不起作用)

kubectl taint node master1 node-role.kubernetes.io/master=""

results matching ""

    No results matching ""