kubespherev2.1.1版本安装在kubernetes v1.15.0
安装完毕后 发现 ks-apigateway 启动失败了,显示CrashLoopBackOff,,如下
[root@kube-node2 ~]# kubectl get pod --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system calico-kube-controllers-7fc57b95d4-nfvpn 1/1 Running 1 21h
kube-system calico-node-dlrfw 1/1 Running 1 21h
kube-system calico-node-srwc9 1/1 Running 1 21h
kube-system calico-node-tj6ng 0/1 Running 2 21h
kube-system coredns-bccdc95cf-696jg 1/1 Running 1 21h
kube-system coredns-bccdc95cf-7p4wl 1/1 Running 1 21h
kube-system etcd-kube-master 1/1 Running 1 21h
kube-system kube-apiserver-kube-master 1/1 Running 2 21h
kube-system kube-controller-manager-kube-master 1/1 Running 1 21h
kube-system kube-flannel-ds-amd64-kjp8p 1/1 Running 1 21h
kube-system kube-flannel-ds-amd64-mhw9l 1/1 Running 1 21h
kube-system kube-flannel-ds-amd64-qbzj7 1/1 Running 1 21h
kube-system kube-proxy-5qpvq 1/1 Running 1 21h
kube-system kube-proxy-8kgt7 1/1 Running 1 21h
kube-system kube-proxy-f47rk 1/1 Running 1 21h
kube-system kube-scheduler-kube-master 1/1 Running 1 21h
kube-system tiller-deploy-57fc46bfc7-cg2sf 1/1 Running 0 62m
kubesphere-controls-system default-http-backend-6555ff6898-27pz8 1/1 Running 0 44m
kubesphere-monitoring-system kube-state-metrics-7c4d6675b-bxxjx 4/4 Running 0 37m
kubesphere-monitoring-system node-exporter-6rq7c 2/2 Running 0 43m
kubesphere-monitoring-system node-exporter-p98lz 2/2 Running 0 43m
kubesphere-monitoring-system node-exporter-xxz6m 2/2 Running 0 43m
kubesphere-monitoring-system prometheus-k8s-0 3/3 Running 1 40m
kubesphere-monitoring-system prometheus-k8s-system-0 3/3 Running 1 39m
kubesphere-monitoring-system prometheus-operator-545df648fb-kv8jf 1/1 Running 0 44m
kubesphere-system ks-account-85698b7c64-p8z5q 0/1 Init:0/2 0 44m
kubesphere-system ks-apigateway-6c98f66cb9-gkz4g 0/1 CrashLoopBackOff 13 44m
kubesphere-system ks-apiserver-9b65f966c-wt6cz 1/1 Running 0 44m
kubesphere-system ks-console-d5c47ddc7-4dsxt 1/1 Running 0 44m
kubesphere-system ks-controller-manager-5ffb44659c-rslvq 1/1 Running 0 44m
kubesphere-system ks-installer-59fb465b7-5pfqq 1/1 Running 0 47m
kubesphere-system openldap-0 1/1 Running 0 45m
kubesphere-system redis-5d4844b947-52zf8 1/1 Running 0 45m
openebs maya-apiserver-77d8f94b58-t2p9r 1/1 Running 5 152m
openebs openebs-admission-server-77b88865d4-d8vj4 1/1 Running 0 152m
openebs openebs-localpv-provisioner-6994dd88b8-mc9kd 1/1 Running 0 152m
openebs openebs-ndm-f6vv2 1/1 Running 0 152m
openebs openebs-ndm-fpjm9 1/1 Running 0 152m
openebs openebs-ndm-nknjc 1/1 Running 0 152m
openebs openebs-ndm-operator-c69cd6666-ml8n4 1/1 Running 1 152m
openebs openebs-provisioner-7b87d7956-kwc8c 1/1 Running 0 152m
openebs openebs-snapshot-operator-6959d684cf-rh9kw 2/2 Running 0 152m
openebs percona-767db88d9d-pxsw7 1/1 Running 0 119m
查看启动日志,显示redis host找不到
[root@kube-node2 ~]# kubectl logs ks-apigateway-6c98f66cb9-gkz4g -n kubesphere-system
[DEV NOTICE] Registered directive 'authenticate' before 'jwt'
[DEV NOTICE] Registered directive 'authentication' before 'jwt'
[DEV NOTICE] Registered directive 'swagger' before 'jwt'
Activating privacy features... done.
2020/08/11 09:45:46 [INFO][cache:0xc000212cd0] Started certificate maintenance routine
E0811 09:45:46.684072 1 redis.go:51] unable to reach redis hostdial tcp: lookup redis.kubesphere-system.svc on 10.96.0.10:53: no such host
2020/08/11 09:45:46 dial tcp: lookup redis.kubesphere-system.svc on 10.96.0.10:53: no such host
可是redis的pod已经正常启动了,查看svc也没发现问题。
[root@kube-node2 ~]# kubectl -n kubesphere-system get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ks-account ClusterIP 10.96.206.105 <none> 80/TCP 48m
ks-apigateway ClusterIP 10.103.110.73 <none> 80/TCP 49m
ks-apiserver ClusterIP 10.105.202.13 <none> 80/TCP 48m
ks-console NodePort 10.97.239.28 <none> 80:30880/TCP 48m
openldap ClusterIP None <none> 389/TCP 49m
redis ClusterIP 10.102.220.140 <none> 6379/TCP 49m
请问是我kubenetes安装的不对导致这个问题的吗?