xyz-li
您好,我启用了redis,新启动一个centos的pod,redis.kubesphere-system.svc能ping通,6379端口也可以
[root@centos-6649c7884b-t5648 bin]# nc -zv 10.233.81.21 6379
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 10.233.81.21:6379.
Ncat: 0 bytes sent, 0 bytes received in 0.00 seconds.
[root@centos-6649c7884b-t5648 bin]# nc -zv redis.kubesphere-system.svc 6379
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 10.233.39.233:6379.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.
[root@centos-6649c7884b-t5648 bin]#
进redis的终端看也没问题
看redis的log也没问题
于是重新找到configmap中的kubesphere-config,将kubesphere.yaml重新复制出来,放源码下面
kubernetes:
kubeconfig: "/root/.kube/config"
master: https://192.168.2.130:6443
$qps: 1e+06
burst: 1000000
authentication:
authenticateRateLimiterMaxTries: 10
authenticateRateLimiterDuration: 10m0s
loginHistoryRetentionPeriod: 168h
maximumClockSkew: 10s
multipleLogin: True
kubectlImage: registry.cn-beijing.aliyuncs.com/kubesphereio/kubectl:v1.22.0
jwtSecret: "v5RHyakbEkcvNMfMBQjfXoCVZutLeKJM"
oauthOptions:
clients:
- name: kubesphere
secret: kubesphere
redirectURIs:
- '*'
redis:
host: redis.kubesphere-system.svc
port: 6379
# password: KUBESPHERE_REDIS_PASSWORD
password: szclznfkvGaIBId
db: 0
network:
ippoolType: none
multicluster:
clusterRole: none
monitoring:
endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090
enableGPUMonitoring: false
gpu:
kinds:
- resourceName: nvidia.com/gpu
resourceType: GPU
default: True
notification:
endpoint: http://notification-manager-svc.kubesphere-monitoring-system.svc:19093
terminal:
image: registry.cn-beijing.aliyuncs.com/kubesphereio/alpine:3.14
timeout: 600
gateway:
watchesPath: /var/helm-charts/watches.yaml
repository: registry.cn-beijing.aliyuncs.com/kubesphereio/nginx-ingress-controller
tag: v1.1.0
namespace: kubesphere-controls-system
但现在启动提示连不上redis
GOROOT= #gosetup
GOPATH=/data/go/go-workspace #gosetup
/usr/local/go/bin/go build -o /mnt/c/Users/chuchq/AppData/Local/Temp/GoLand/___5go_build_apiserver_go_linux /data/go/go-workspace/src/kubesphere/cmd/ks-apiserver/apiserver.go #gosetup
/mnt/c/Users/chuchq/AppData/Local/Temp/GoLand/___5go_build_apiserver_go_linux #gosetup
W0812 14:52:24.102789 23237 metricsserver.go:238] Metrics API not available.
Error: failed to connect to redis service, please check redis status, error: dia
l tcp: i/o timeout
2022/08/12 14:52:29 failed to connect to redis service, please check redis statu
s, error: dial tcp: i/o timeout
Process finished with the exit code 1
请问这种情况需要如何处理?
—————————————————————————————————————-
尝试解决1:
我在service中新建了一个nodeport的svc,然后在源码中的kubesphere.yaml改为,目前是可以启动了,但是访问接口还是不行