lework/kainstall

[ERROR Port-6443]: Port 6443 is in use

hbstarjason opened this issue · 2 comments

bash kainstall-centos.sh init
--master 10.39.80.188,10.39.80.187,10.39.80.189
--worker 10.39.80.190
--user root
--password 1qazXSW@
--port 22
--version 1.23.3

Warning: Permanently added '10.39.80.188' (ECDSA) to the list of known hosts.
[2022-06-26T22:28:19.157826640+0800]: INFO: [kubeadm init] 10.39.80.188: set kubeadmcfg.yaml succeeded.
[2022-06-26T22:28:19.160159747+0800]: INFO: [kubeadm init] 10.39.80.188: kubeadm init start.
[2022-06-26T22:28:19.170729651+0800]: EXEC: [command] sshpass -p "zzzzzz" ssh -o ConnectTimeout=600 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@10.39.80.188 -p 22 bash -c 'kubeadm init --config=/etc/kubernetes/kubeadmcfg.yaml --upload-certs'
Warning: Permanently added '10.39.80.188' (ECDSA) to the list of known hosts.
[init] Using Kubernetes version: v1.23.3
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Port-6443]: Port 6443 is in use
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
[2022-06-26T22:28:19.719600219+0800]: ERROR: [kubeadm init] 10.39.80.188: kubeadm init failed.

端口被占用,可能是之前安装的环境未被清理掉。

应该是不能master和worker复用。