环境:kubesphere v2.1 on kubernate v1.14.8
安装kuberinstall安装完成后,发现redis server 的状态为:Init:Error
通过
1 查看POD描述信息: kubectl -n kubesphere-system describe po redis-ha-server-0
发现该pod 定义了3个containers,第一个容器config-init就报错,信息如下:
State: Waiting
Reason: CrashLoopBackOff
2 进一步查看日志:kubectl -n kubesphere-system logs redis-ha-server-0 -c config-init
输出如下:
Could not connect to Redis at redis-ha:26379: Try again
Initializing config..
/readonly-config/init.sh: line 84: Could not resolve the announce ip for this pod: not found
3 通过上一步日志问题出在redies-ha-haproxy,但是redis-ha的状态是running,貌似没什么问题:kubectl -n kubesphere-system get po -owide | grep redis-ha-haproxy
redis-ha-haproxy-5db9c79b8-7kcpp 1/1 Running 0 2d12h 10.244.2.19 k8s-m03 <none> <none>
redis-ha-haproxy-5db9c79b8-ts9kt 1/1 Running 0 2d12h 10.244.1.17 k8s-m02 <none> <none>
redis-ha-haproxy-5db9c79b8-vtjjf 1/1 Running 0 2d12h 10.244.0.17 k8s-m01 <none> <none>
4 查看redies-ha-haproxy描述新,也没有发现问题,下面我该怎么来解决这个问题呢?