Harvester安装后报错etcd

环境信息:

  • Harvester ISO 版本: 1.1.1
  • 底层基础设施 (vmware 虚拟机:16Cpu,64G内存):

etcd错误,日志路径:tail -f /var/log/pods/kube-system_etcd-test_e18aa5e5b83a5a3c56d78e4054612394/etcd/0.log

日志:2022-12-27T07:02:51.936927586Z stderr F {“level”:“warn”,“ts”:“2022-12-27T07:02:51.936Z”,“caller”:“embed/config_logging.go:169”,“msg”:“rejected connection”,“remote-addr”:“127.0.0.1:57666”,“server-name”:"",“error”:“remote error: tls: bad certificate”}

2022-12-27T07:02:54.445495377Z stderr F {“level”:“warn”,“ts”:“2022-12-27T07:02:54.445Z”,“caller”:“embed/config_logging.go:169”,“msg”:“rejected connection”,“remote-addr”:“127.0.0.1:57680”,“server-name”:"",“error”:“remote error: tls: bad certificate”}

2022-12-27T07:02:55.285539717Z stderr F {“level”:“warn”,“ts”:“2022-12-27T07:02:55.285Z”,“caller”:“embed/config_logging.go:169”,“msg”:“rejected connection”,“remote-addr”:“127.0.0.1:57686”,“server-name”:"",“error”:“remote error: tls: bad certificate”}

系统时间是:
test:~ # date
Tue Dec 27 08:00:52 UTC 2022
test:~ # ls -lhtr /etc/localtime
lrwxrwxrwx. 1 root root 27 Nov 3 10:12 /etc/localtime → /usr/share/zoneinfo/Etc/UTC

pods日志:
2022-12-27T07:52:44.832365118Z stderr F {“level”:“warn”,“ts”:“2022-12-27T07:52:44.831Z”,“caller”:“embed/config_logging.go:169”,“msg”:“rejected connection”,“remote-addr”:“127.0.0.1:36654”,“server-name”:"",“error”:“tls: failed to verify client certificate: x509: certificate has expired or is not yet valid: current time 2022-12-27T07:52:44Z is before 2022-12-27T15:47:08Z”}

这个是时钟不同步导致的 证书报错。

你可以在安装 harvester 的时候设置国内访问比较友好的 ntp server,比如:ntp.ubuntu.com

如果你是在 vwmare 上去安装,你可以尝试使用宿主机的 ntp,配置方法:

已解决,非常感谢。