Open mrchicn opened 1 year ago
kubectl edit cm kuboard-v3-config -n kuboard
KUBOARD_SERVER_NODE_PORT: '30080'
KUBOARD_ENDPOINT: 'http://192.168.1.36:30080'
kubectl delete pod kuboard-v3-76996c957f-zd8g5 -n kuboard
kubectl logs -f kuboard-v3-76996c957f-l5wgh -n kuboard
admin Kuboard123
情况一样但是我的删除了pod重新拉起来也不行,etcd不断error
我的删除了pod重新拉起来也不行 kuboard pod/kuboard-etcd-fgtvj 0/1 CrashLoopBackOff 3 (6s ago) 53s kuboard pod/kuboard-etcd-m4lg4 1/1 Running 1 (38s ago) 2m10s kuboard pod/kuboard-etcd-r7fts 0/1 CrashLoopBackOff 4 (29s ago) 2m10s kuboard pod/kuboard-etcd-wcxmk 0/1 CrashLoopBackOff 2 (7s ago) 34s kuboard pod/kuboard-v3-f9988994-vv48j 0/1 Running 1 (39s ago) 2m10s tigera-operator pod/tigera-operator-6675dc47f4-6j9xq 1/1 Running 5 (21m ago) 22h 经检查发现是我在安装集群的时候已经安装了etcd-host,2381端口冲突 {"level":"fatal","ts":"2022-11-13T12:18:09.184Z","caller":"etcdmain/etcd.go:271","msg":"discovery failed","error":"listen tcp 10.20.24.11:2381: bind: address already in use","stacktrace":"go.etc d.io/etcd/etcdmain.startEtcdOrProxyV2\n\t/tmp/etcd-release-3.4.16/etcd/release/etcd/etcdmain/etcd .go:271\ngo.etcd.io/etcd/etcdmain.Main\n\t/tmp/etcd-release-3.4.16/etcd/release/etcd/etcdmain/mai n.go:46\nmain.main\n\t/tmp/etcd-release-3.4.16/etcd/release/etcd/main.go:28\nruntime.main\n\t/usr /local/go/src/runtime/proc.go:200"}
装过了etcd-host, 安装kuboard的时候又重新装了一遍。可以不装吗? 或者请教一下如何修改端口,让2381不再冲突?
k8s 环境
HA + Keeplievd 做的负载均衡
使用官网提供的方式进行一键安装
kubectl apply -f https://addons.kuboard.cn/kuboard/kuboard-v3.yaml 您也可以使用下面的指令,唯一的区别是,该指令使用华为云的镜像仓库替代 docker hub 分发 Kuboard 所需要的镜像 kubectl apply -f https://addons.kuboard.cn/kuboard/kuboard-v3-swr.yaml
启动的 kuboard-etcd 正常
[root@k8s-1-31 ~]# kubectl get pod -n kuboard NAME READY STATUS RESTARTS AGE kuboard-etcd-49mjf 1/1 Running 0 25m kuboard-etcd-f7g4m 1/1 Running 0 26m kuboard-etcd-jk45w 1/1 Running 0 26m kuboard-v3-76996c957f-zd8g5 0/1 CrashLoopBackOff 9 (105s ago) 23m
查看 kuboard-v3-76996c957f-zd8g5 日志如下:
time="2022-11-02T16:05:38Z" level=info msg="config using log level: info" time="2022-11-02T16:05:38Z" level=info msg="config issuer: http://192.168.1.35:30080/sso" time="2022-11-02T16:05:38Z" level=info msg="config storage: etcd" time="2022-11-02T16:05:38Z" level=info msg="config static client: KuboardApp" time="2022-11-02T16:05:38Z" level=info msg="config connector: default" time="2022-11-02T16:05:38Z" level=info msg="config skipping approval screen" time="2022-11-02T16:05:38Z" level=info msg="config signing keys expire after: 6h0m0s" time="2022-11-02T16:05:38Z" level=info msg="config id tokens valid for: 168h0m0s" time="2022-11-02T16:05:38Z" level=info msg="config device requests valid for: 5m0s" 设置日志级别为 info [LOG] 2022/11/03 - 00:05:41.650 | /common/etcd.client_config 24 | info | KUBOARD_ETCD_ENDPOINTS=[] [LOG] 2022/11/03 - 00:05:41.650 | /common/etcd.client_config 52 | info | {[] 0s 1s 0s 0s 0 0 false [] false}
[LOG] 2022/11/03 - 00:05:41.651 | /initializekuboard.InitializeEtcd 39 | info | 初始化 ./init-etcd-scripts/audit-policy-once.yaml
{"level":"warn","ts":"2022-11-03T00:05:43.619+0800","caller":"clientv3/retry_interceptor.go:61","msg":"retrying of unary invoker failed","target":"endpoint://client-f777d7ed-593f-4336-b868-86a448cc4919/","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial tcp: missing address\""}
failed to initialize server: server: failed to list connector objects from storage: context deadline exceeded
[root@k8s-1-31 ~]#
查看了 kuboard-etcd 的日志都是正常的。不知道问题出在哪里了。我看报错信息好像是地址找不到了,是因为走了 Keeplievd 的原因么? 但是我看着像是连 pod 中的etcd 出现错误了。我的网络是 calico 检查过网络是同的 部署 Nginx 暴露服务也么有问题
tips:
已解决~