报错日志:
INFO[18:39:53 CST] Generating etcd certs
INFO[18:39:54 CST] Synchronizing etcd certs
INFO[18:39:54 CST] Creating etcd service
INFO[18:39:55 CST] Starting etcd cluster
[master 192.168.31.129] MSG:
Configuration file already exists
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
Waiting for etcd to start
WARN[16:40:58 CST] Task failed ...
WARN[16:40:58 CST] error: Failed to start etcd cluster: Failed to exec command: sudo -E /bin/sh -c "export ETCDCTL_API=2;exportCDCTL_CERT_FILE='/etc/ssl/etcd/ssl/admin-master.pem';export ETCDCTL_KEY_FILE='/etc/ssl/etcd/ssl/admin-master-key.pem';export ETTL_CA_FILE='/etc/ssl/etcd/ssl/ca.pem';/usr/local/bin/etcdctl --endpoints=https://192.168.31.129:2379 cluster-health | grep -q 'ster is healthy'"
Error: client: etcd cluster is unavailable or misconfigured; error #0: client: endpoint https://192.168.31.129:2379 exceeded her timeout
error #0: client: endpoint https://192.168.31.129:2379 exceeded header timeout: Process exited with status 1
Error: Failed to start etcd cluster: Failed to start etcd cluster: Failed to exec command: sudo -E /bin/sh -c "export ETCDCTL_A2;export ETCDCTL_CERT_FILE='/etc/ssl/etcd/ssl/admin-master.pem';export ETCDCTL_KEY_FILE='/etc/ssl/etcd/ssl/admin-master-key.pemxport ETCDCTL_CA_FILE='/etc/ssl/etcd/ssl/ca.pem';/usr/local/bin/etcdctl --endpoints=https://192.168.31.129:2379 cluster-health rep -q 'cluster is healthy'"
Error: client: etcd cluster is unavailable or misconfigured; error #0: client: endpoint https://192.168.31.129:2379 exceeded her timeout
error #0: client: endpoint https://192.168.31.129:2379 exceeded header timeout: Process exited with status 1
Usage:
kk create cluster [flags]
Flags:
-f, --filename string Path to a configuration file
-h, --help help for cluster
--skip-pull-images Skip pre pull images
--with-kubernetes string Specify a supported version of kubernetes
--with-kubesphere Deploy a specific version of kubesphere (default v3.0.0)
-y, --yes Skip pre-check of the installation
Global Flags:
--debug Print detailed information (default true)
Failed to start etcd cluster: Failed to start etcd cluster: Failed to exec command: sudo -E /bin/sh -c "export ETCDCTL_API=2;ext ETCDCTL_CERT_FILE='/etc/ssl/etcd/ssl/admin-master.pem';export ETCDCTL_KEY_FILE='/etc/ssl/etcd/ssl/admin-master-key.pem';exporTCDCTL_CA_FILE='/etc/ssl/etcd/ssl/ca.pem';/usr/local/bin/etcdctl --endpoints=https://192.168.31.129:2379 cluster-health | grep 'cluster is healthy'"
Error: client: etcd cluster is unavailable or misconfigured; error #0: client: endpoint https://192.168.31.129:2379 exceeded her timeout
error #0: client: endpoint https://192.168.31.129:2379 exceeded header timeout: Process exited with status 1
sudo -E /bin/sh -c "export ETCDCTL_API=2;export ETCDCTL_CERT_FILE='/etc/ssl/etcd/ssl/admin-master.pem';export ETCDCTL_KEY_FILE='/etc/ssl/etcd/ssl/admin-master-key.pem';export ETCDCTL_CA_FILE='/etc/ssl/etcd/ssl/ca.pem';/usr/local/bin/etcdctl --endpoints=https://192.168.31.129:2379 cluster-health | grep -q 'cluster is healthy'"
我的环境:
一台windows10的电脑,IP 192.168.31.129,端口8000映射到虚拟机的192.168.196.129:22端口,端口2379映射到虚拟机的192.168.196.129:2379端口。
一台mac,IP 192.168.31.95,端口8001,8002映射到虚拟机中10.211.55.13:22,10.211.55.14:22端口。
虚拟机都是Centos7.6。
config-sample.yaml配置,只改了以下内容,其他都没改:
spec:
hosts:
- {name: master, address: 192.168.31.129, internalAddress: 192.168.31.129, port: 8000, privateKeyPath: "~/.ssh/id_rsa"}
- {name: node1, address: 192.168.31.95, internalAddress: 192.168.31.95, port: 8001, privateKeyPath: "~/.ssh/id_rsa"}
- {name: node2, address: 192.168.31.95, internalAddress: 192.168.31.95, port: 8002, privateKeyPath: "~/.ssh/id_rsa"}
roleGroups:
etcd:
- master
master:
- master
worker:
- node1
- node2