使用如下配置安装首台节点:
/etc/rancher/rke2/config.yaml
write-kubeconfig-mode: "0644"
tls-san:
- "192.168.28.210"
- "172.16.28.1"
- "172.16.28.2"
- "172.16.28.3"
token: "c6bd0cbb1ba63bd486312e0a2d1fbccd"
debug: true
systemctl enable rke2-server
systemctl start rke2-server
没问题,启动正常
操作第二台:
/etc/rancher/rke2/config.yaml
server: https://192.168.28.210:9345
write-kubeconfig-mode: "0644"
tls-san:
- "192.168.28.210"
- "172.16.28.1"
- "172.16.28.2"
- "172.16.28.3"
token: "c6bd0cbb1ba63bd486312e0a2d1fbccd"
debug: true
systemctl enable rke2-server
systemctl start rke2-server
Job for rke2-server.service failed because the control process exited with error code.
See “systemctl status rke2-server.service” and “journalctl -xeu rke2-server.service” for details.
level=fatal msg=“starting kubernetes: preparing server: failed to validate server configuration: not authorized”
报错说认证失败,无法加入集群?