kubeadm init --config=kubeadm-config.yaml --experimental-upload-certs
会报错
[init] Using Kubernetes version: v1.14.0
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Port-10250]: Port 10250 is in use
[ERROR DirAvailable--var-lib-etcd]: /var/lib/etcd is not empty
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
修改命令,把上面两个错误忽略掉重启即可:
kubeadm init --config=kubeadm-config.yaml --experimental-upload-certs --ignore-preflight-errors=Port-10250,DirAvailable--var-lib-etcd