Change:
set -e <ins> #clean all init/init.d/configs function do_backup_clean() { #backup all config files init_files=`ls init_conf` for i in $init_files do if [ -f /etc/init/$i ] then mv /etc/init/${i} /etc/init/${i}.bak fi done initd_files=`ls initd_scripts` for i in $initd_files do if [ -f /etc/init.d/$i ] then mv /etc/init.d/${i} /etc/init.d/${i}.bak fi done default_files=`ls default_scripts` for i in $default_files do if [ -e /etc/default/$i ] then mv /etc/default/${i} /etc/default/${i}.bak fi done # clean work dir if [ ! -d ./work ] then mkdir work fi cp -rf default_scripts init_conf initd_scripts work } </ins> function cpMaster(){ # copy /etc/init files <del> cp init_conf/etcd.conf /etc/init/ cp init_conf/kube-apiserver.conf /etc/init/ cp init_conf/kube-controller-manager.conf /etc/init/ cp init_conf/kube-scheduler.conf /etc/init/ </del> <ins> cp work/init_conf/etcd.conf /etc/init/ cp work/init_conf/kube-apiserver.conf /etc/init/ cp work/init_conf/kube-controller-manager.conf /etc/init/ cp work/init_conf/kube-scheduler.conf /etc/init/ </ins> # copy /etc/initd/ files <del> cp initd_scripts/etcd /etc/init.d/ cp initd_scripts/kube-apiserver /etc/init.d/ cp initd_scripts/kube-controller-manager /etc/init.d/ cp initd_scripts/kube-scheduler /etc/init.d/ </del> <ins> cp work/initd_scripts/etcd /etc/init.d/ cp work/initd_scripts/kube-apiserver /etc/init.d/ cp work/initd_scripts/kube-controller-manager /etc/init.d/ cp work/initd_scripts/kube-scheduler /etc/init.d/ </ins> # copy default configs <del> cp default_scripts/etcd /etc/default/ cp default_scripts/kube-apiserver /etc/default/ cp default_scripts/kube-scheduler /etc/default/ cp default_scripts/kube-controller-manager /etc/default/ </del> <ins> cp work/default_scripts/etcd /etc/default/ cp work/default_scripts/kube-apiserver /etc/default/ cp work/default_scripts/kube-scheduler /etc/default/ cp work/default_scripts/kube-controller-manager /etc/default/ </ins> } function cpMinion(){ # copy /etc/init files <del> cp init_conf/etcd.conf /etc/init/ cp init_conf/kubelet.conf /etc/init/ cp init_conf/flanneld.conf /etc/init/ cp init_conf/kube-proxy.conf /etc/init/ </del> <ins> cp work/init_conf/etcd.conf /etc/init/etcd.conf cp work/init_conf/kubelet.conf /etc/init/kubelet.conf cp work/init_conf/flanneld.conf /etc/init/flanneld.conf cp work/init_conf/kube-proxy.conf /etc/init/ </ins> # copy /etc/initd/ files <del> cp initd_scripts/etcd /etc/init.d/ cp initd_scripts/flanneld /etc/init.d/ cp initd_scripts/kubelet /etc/init.d/ cp initd_scripts/kube-proxy /etc/init.d/ </del> <ins> cp work/initd_scripts/etcd /etc/init.d/ cp work/initd_scripts/flanneld /etc/init.d/ cp work/initd_scripts/kubelet /etc/init.d/ cp work/initd_scripts/kube-proxy /etc/init.d/ </ins> # copy default configs <del> cp default_scripts/etcd /etc/default/ cp default_scripts/flanneld /etc/default/ cp default_scripts/kube-proxy /etc/default cp default_scripts/kubelet /etc/default/ </del> <ins> cp work/default_scripts/etcd /etc/default/ cp work/default_scripts/flanneld /etc/default/ cp work/default_scripts/kube-proxy /etc/default cp work/default_scripts/kubelet /etc/default/ </ins> } # check if input IP in machine list

Discussion:
I used the ubuntu-cluster setup scripts to build a mini testing environment. The first time I inputted a wrong config and when I reconfigured the environment by running the scripts again an error occured. I looked into the code and found the scripts hadn't deal with old configs. And of kube-proxy configs are not replaced.
Looks like this was fixed by .