创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
例如:虚拟机,debian 11,4C/8G
Kubernetes版本信息
Client Version: version.Info{Major:“1”, Minor:“22”, GitVersion:“v1.22.10”, GitCommit:“eae22ba6238096f5dec1ceb62766e97783f0ba2f”, GitTreeState:“clean”, BuildDate:“2022-05-24T12:56:35Z”, GoVersion:“go1.16.15”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1”, Minor:“22”, GitVersion:“v1.22.10”, GitCommit:“eae22ba6238096f5dec1ceb62766e97783f0ba2f”, GitTreeState:“clean”, BuildDate:“2022-05-24T12:50:52Z”, GoVersion:“go1.16.15”, Compiler:“gc”, Platform:“linux/amd64”}
容器运行时
docker version
20.10.17
KubeSphere版本信息
v3.3.0。使用kk安装。
问题是什么
使用 KubeKey 内置 HAproxy 创建高可用集群三个node 创建成功无法登入提示
get pod 是三个节点的 ks-apiserver 都未启动
ks-apiserver 日志:
Error: failed to connect to redis service, please check redis status, error: dial tcp: i/o timeout
2022/09/14 21:07:52 failed to connect to redis service, please check redis status, error: dial tcp: i/o timeout
redis 日志:
1:C 14 Sep 2022 12:46:28.394 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 14 Sep 2022 12:46:28.394 # Redis version=5.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 14 Sep 2022 12:46:28.394 # Configuration loaded
1:M 14 Sep 2022 12:46:28.396 * Running mode=standalone, port=6379.
1:M 14 Sep 2022 12:46:28.396 # Server initialized
1:M 14 Sep 2022 12:46:28.396 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
1:M 14 Sep 2022 12:46:28.396 * Ready to accept connections
主机 /etc/resolv.conf
主机 /etc/hosts
其他pod内 ping redis ip 可以ping通