创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
在阿里云ECS实例中,同一个安全组下三台机器,通过kk安装K8S和ks,ks在登录页面报错,恳请大佬协助为感!
操作系统信息
虚拟机,Centos7.9,8C/32G
Kubernetes版本信息
v1.23.7
容器运行时
docker version:
20.10.17
KubeSphere版本信息
v3.3.0 使用kk安装。
问题是什么
登录页面报错:request to http://ks-apiserver/oauth/token failed, reason: getaddrinfo EAI_AGAIN ks-apiserver
*********************查看ks pod正常************
[root@ecs-0008 kkk]# kubectl get pod -n kubesphere-system
NAME READY STATUS RESTARTS AGE
ks-apiserver-5bc97d4496-fg786 1/1 Running 0 4h26m
ks-console-5ff9d8f9d-fc5zc 1/1 Running 0 4h26m
ks-controller-manager-7647fb7bf-zdnn8 1/1 Running 0 4h26m
ks-installer-65bc964898-ckgcq 1/1 Running 0 4h29m
*********************ks-controller-manager日志**********
[root@ecs-0008 kkk]# kubectl -n kubesphere-system logs -l app=ks-controller-manager
I0906 16:08:16.257657 1 globalrolebinding_controller.go:205] Successfully synced key:admin
I0906 16:08:16.257680 1 event.go:282] Event(v1.ObjectReference{Kind:“GlobalRoleBinding”, Namespace:"", Name:“admin”, UID:“41d6d44a-3287-4079-a575-ac3b13640d8d”, APIVersion:“iam.kubesphere.io/v1alpha2”, ResourceVersion:“3615”, FieldPath:""}): type: ‘Normal’ reason: ‘Synced’ GlobalRoleBinding synced successfully
I0906 16:08:16.263075 1 clusterrolebinding_controller.go:190] Successfully synced key:admin-cluster-admin
I0906 16:08:16.263097 1 event.go:282] Event(v1.ObjectReference{Kind:“ClusterRoleBinding”, Namespace:"", Name:“admin-cluster-admin”, UID:“e78db456-304c-4e3e-a6a3-5ea931fdefc0”, APIVersion:“rbac.authorization.k8s.io/v1”, ResourceVersion:“4702”, FieldPath:""}): type: ‘Normal’ reason: ‘Synced’ ClusterRoleBinding synced successfully
E0906 16:08:46.328826 1 pvc_autoresizer.go:108] pvc-autoresizer “msg”=“metricsClient.GetMetrics failed” “error”="Post \“http://prometheus-operated.kubesphere-monitoring-system.svc:9090/api/v1/query\”: dial tcp: i/o timeout"
E0906 16:09:46.328125 1 pvc_autoresizer.go:108] pvc-autoresizer “msg”=“metricsClient.GetMetrics failed” “error”="Post \“http://prometheus-operated.kubesphere-monitoring-system.svc:9090/api/v1/query\”: dial tcp: i/o timeout"
E0906 16:10:46.327903 1 pvc_autoresizer.go:108] pvc-autoresizer “msg”=“metricsClient.GetMetrics failed” “error”="Post \“http://prometheus-operated.kubesphere-monitoring-system.svc:9090/api/v1/query\”: dial tcp: i/o timeout"
E0906 16:11:46.328072 1 pvc_autoresizer.go:108] pvc-autoresizer “msg”=“metricsClient.GetMetrics failed” “error”="Post \“http://prometheus-operated.kubesphere-monitoring-system.svc:9090/api/v1/query\”: dial tcp: i/o timeout"
E0906 16:12:46.337352 1 pvc_autoresizer.go:108] pvc-autoresizer “msg”=“metricsClient.GetMetrics failed” “error”="Post \“http://prometheus-operated.kubesphere-monitoring-system.svc:9090/api/v1/query\”: dial tcp: i/o timeout"
E0906 16:13:46.337879 1 pvc_autoresizer.go:108] pvc-autoresizer “msg”=“metricsClient.GetMetrics failed” “error”="Post \“http://prometheus-operated.kubesphere-monitoring-system.svc:9090/api/v1/query\”: dial tcp: i/o timeout"
*********************ks-apiserver日志**********
[root@ecs-0008 kkk]# kubectl -n kubesphere-system logs -l app=ks-apiserver
W0906 11:48:22.451849 1 client_config.go:615] Neither –kubeconfig nor –master was specified. Using the inClusterConfig. This might not work.
W0906 11:48:22.454300 1 client_config.go:615] Neither –kubeconfig nor –master was specified. Using the inClusterConfig. This might not work.
W0906 11:48:22.466153 1 metricsserver.go:238] Metrics API not available.
W0906 11:48:22.466183 1 options.go:191] ks-apiserver starts without redis provided, it will use in memory cache. This may cause inconsistencies when running ks-apiserver with multiple replicas.
I0906 11:48:22.466217 1 interface.go:50] start helm repo informer
I0906 11:48:22.720264 1 apiserver.go:417] Start cache objects
I0906 11:48:23.338341 1 apiserver.go:601] Finished caching objects
I0906 11:48:23.338369 1 apiserver.go:298] Start listening on :9090
[root@ecs-0008 kkk]#