k8s集群为自建,版本信息如下:
[root@k8s-node-01 ~]# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
k8s-node-01 Ready control-plane 24h v1.25.0 192.168.91.101 <none> CentOS Linux 7 (Core) 5.4.210-1.el7.elrepo.x86_64 docker://20.10.17
k8s-node-02 Ready <none> 24h v1.25.0 192.168.91.102 <none> CentOS Linux 7 (Core) 5.4.210-1.el7.elrepo.x86_64 docker://20.10.17
k8s-node-03 Ready <none> 24h v1.25.0 192.168.91.103 <none> CentOS Linux 7 (Core) 5.4.210-1.el7.elrepo.x86_64 docker://20.10.17
k8s-node-04 Ready <none> 24h v1.25.0 192.168.91.105 <none> CentOS Linux 7 (Core) 5.4.210-1.el7.elrepo.x86_64 docker://20.10.17
helm安装命令如下:
[root@k8s-node-01 ~]# kubectl create namespace rbd-system
[root@k8s-node-01 ~]# helm repo add rainbond https://openchart.goodrain.com/goodrain/rainbond
[root@k8s-node-01 ~]# helm repo update
[root@k8s-node-01 ~]# helm install –set Cluster.gatewayIngressIPs=192.168.91.102 –set Cluster.enableHA=false –set Cluster.nodesForGateway[0].name=k8s-node-02 –set Cluster.nodesForGateway[0].externalIP=192.168.91.102 –set Cluster.nodesForGateway[0].internalIP=192.168.91.102 rainbond rainbond/rainbond-cluster -n rbd-system
安装状态结果如下:
[root@k8s-node-01 ~]# kubectl get pod -n rbd-system
NAME READY STATUS RESTARTS AGE
dashboard-metrics-scraper-dc59c599-6×26w 1/1 Running 0 12m
kubernetes-dashboard-84c79d6658-czll4 1/1 Running 0 13m
nfs-provisioner-0 1/1 Running 0 15m
rainbond-operator-6d49896cb4-5p7lp 1/1 Running 0 15m
rbd-api-558d64f8d4-n4mgx 0/1 Running 0 13m
rbd-app-ui-57b7766496-hzm76 1/1 Running 0 11m
rbd-app-ui-migrations-jhczq 0/1 Completed 0 12m
rbd-chaos-nflqs 1/1 Running 0 13m
rbd-chaos-zn7q9 1/1 Running 0 13m
rbd-db-0 2/2 Running 0 13m
rbd-etcd-0 1/1 Running 0 15m
rbd-eventlog-0 1/1 Running 0 13m
rbd-gateway-bt8lc 1/1 Running 0 15m
rbd-gateway-hzbsh 1/1 Running 0 15m
rbd-hub-6788b577b5-4p4vx 1/1 Running 0 15m
rbd-monitor-0 1/1 Running 0 13m
rbd-mq-778c57c959-fmtt5 1/1 Running 0 13m
rbd-node-9hb2j 1/1 Running 0 15m
rbd-node-kq2pn 1/1 Running 0 15m
rbd-node-pnzjx 1/1 Running 0 15m
rbd-node-wz7qd 1/1 Running 0 15m
rbd-resource-proxy-7cb5548f76-xpmd7 1/1 Running 0 13m
rbd-webcli-5778c59685-bnkwz 1/1 Running 0 13m
rbd-worker-96cfb47bc-65c6b 0/1 Running 0 13m
查看异常Pod日志
[root@k8s-node-01 ~]# kubectl logs -n rbd-system rbd-worker-96cfb47bc-65c6b
time=“2022-08-25T16:48:13+08:00” level=error msg=“get db manager failed, try time is 10,dial tcp: lookup rbd-db-rw on 10.196.0.10:53: no such host”
time=“2022-08-25T16:48:23+08:00” level=error msg=“get db manager failed, try time is 10,dial tcp: lookup rbd-db-rw on 10.196.0.10:53: no such host”
time=“2022-08-25T16:48:33+08:00” level=error msg=“get db manager failed, try time is 10,dial tcp: lookup rbd-db-rw on 10.196.0.10:53: no such host”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenants to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services_port to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services_relation to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services_envs to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services_mnt_relation to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services_volume to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services_label to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services_probe to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table rainbond_license to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_services_delete to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_lb_mapping_port to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_plugin to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_plugin_build_version to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_service_plugin_relation to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_plugin_version_env to db success”
time=“2022-08-25T16:48:43+08:00” level=info msg=“auto create table tenant_plugin_version_config to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_codecheck to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_event to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_service_version to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table user_region_info to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_stream_plugin_port to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table region_api_class to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table region_protocols to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table local_scheduler to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table region_notification_event to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table region_app_status to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table region_app_backup to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_source to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table applications to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table app_config_group to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table app_config_group_service to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table app_config_group_item to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table gateway_certificate to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table gateway_rule_extension to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table gateway_http_rule to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table gateway_http_rule_rewrite to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table gateway_tcp_rule to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_service_config_file to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_service_3rd_party_endpoints to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_service_3rd_party_discovery_cfg to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table gateway_rule_config to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_volume_type to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_autoscaler_rules to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_autoscaler_rule_metrics to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_scaling_records to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table tenant_services_monitor to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table component_k8s_attributes to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“auto create table k8s_resources to db success”
time=“2022-08-25T16:48:44+08:00” level=info msg=“db manager is ready”
time=“2022-08-25T16:48:44+08:00” level=info msg=“etcd.v3 client is ready”
time=“2022-08-25T16:48:44+08:00” level=info msg=“start a event log handle core. connect server 127.0.0.1:6366”
time=“2022-08-25T16:48:44+08:00” level=error msg="create event log client error.rpc error: code = Unavailable desc = connection error: desc = \“transport: Error while dialing dial tcp 127.0.0.1:6366: connect: connection refused\”"
time=“2022-08-25T16:48:44+08:00” level=warning msg=“event server 127.0.0.1:6366 can not link, will ignore it.”
W0825 16:48:45.346591 1 warnings.go:70] autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
W0825 16:48:45.349181 1 warnings.go:70] autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
E0825 16:48:45.423358 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:48:47.020137 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:48:49.596172 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:48:54.901326 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
time=“2022-08-25T16:48:56+08:00” level=info msg=“Add event server endpoint,10.120.127.209:6366”
time=“2022-08-25T16:48:56+08:00” level=info msg=“start a event log handle core. connect server 10.120.127.209:6366”
E0825 16:49:05.055474 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:49:25.872461 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:49:59.893855 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:50:54.000320 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:51:24.798670 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:52:01.142092 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:52:49.867730 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:53:25.752794 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:54:02.858876 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:54:54.015729 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
W0825 16:55:41.352029 1 warnings.go:70] autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
E0825 16:55:44.905638 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:56:24.156917 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:57:18.440045 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:58:05.770920 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:59:05.097153 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 16:59:37.984383 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 17:00:12.809324 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 17:00:55.276816 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 17:01:30.658110 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0825 17:02:13.620935 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource
[root@k8s-node-01 ~]# kubectl logs -n rbd-system rbd-api-558d64f8d4-n4mgx
time=“2022-08-25T16:48:40+08:00” level=info msg=“Etcd Server : [http://rbd-etcd:2379]”
time=“2022-08-25T16:48:40+08:00” level=info msg=“etcd.v3 client is ready”
time=“2022-08-25T16:48:40+08:00” level=error msg=“get db manager failed, try time is 10,dial tcp: lookup rbd-db-rw on 10.196.0.10:53: no such host”
time=“2022-08-25T16:48:52+08:00” level=info msg=“db manager is ready”
time=“2022-08-25T16:48:52+08:00” level=info msg=“api database initialization starting…”
time=“2022-08-25T16:48:52+08:00” level=info msg=“etcd.v3 client is ready”
time=“2022-08-25T16:48:52+08:00” level=info msg=“start a event log handle core. connect server 127.0.0.1:6366”
time=“2022-08-25T16:48:52+08:00” level=error msg="create event log client error.rpc error: code = Unavailable desc = connection error: desc = \“transport: Error while dialing dial tcp 127.0.0.1:6366: connect: connection refused\”"
time=“2022-08-25T16:48:52+08:00” level=warning msg=“event server 127.0.0.1:6366 can not link, will ignore it.”
time=“2022-08-25T16:48:52+08:00” level=info msg=“etcd.v3 client is ready”
time=“2022-08-25T16:48:52+08:00” level=info msg=“start a event log handle core. connect server 127.0.0.1:6366”
time=“2022-08-25T16:48:52+08:00” level=error msg="create event log client error.rpc error: code = Unavailable desc = connection error: desc = \“transport: Error while dialing dial tcp 127.0.0.1:6366: connect: connection refused\”"
time=“2022-08-25T16:48:52+08:00” level=warning msg=“event server 127.0.0.1:6366 can not link, will ignore it.”
time=“2022-08-25T16:48:52+08:00” level=info msg=“etcd.v3 client is ready”
time=“2022-08-25T16:48:52+08:00” level=info msg=“api database initialization success!”
time=“2022-08-25T16:48:56+08:00” level=info msg=“Add event server endpoint,10.120.127.209:6366”
time=“2022-08-25T16:48:56+08:00” level=info msg=“start a event log handle core. connect server 10.120.127.209:6366”
time=“2022-08-25T16:48:56+08:00” level=info msg=“Add event server endpoint,10.120.127.209:6366”
time=“2022-08-25T16:48:56+08:00” level=info msg=“start a event log handle core. connect server 10.120.127.209:6366”