创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
虚拟机 CentOS 7.6
Kubernetes版本信息
kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.4", GitCommit:"c96aede7b5205121079932896c4ad89bb93260af", GitTreeState:"clean", BuildDate:"2020-06-17T11:41:22Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.4", GitCommit:"c96aede7b5205121079932896c4ad89bb93260af", GitTreeState:"clean", BuildDate:"2020-06-17T11:33:59Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
容器运行时
集群版本为1.18,只有docker,并没有使用containerd
docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:03 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:25:29 2018
OS/Arch: linux/amd64
Experimental: false
KubeSphere版本信息
v3.1.1
在线安装
在已有K8s上安装
问题是什么
ks-console频繁重启,导致web页面无法访问
1、查看pod日志,无异常信息,最近一次pod日志如下
> kubesphere-console@3.0.0 serve /opt/kubesphere/console
> NODE_ENV=production node server/server.js
Dashboard app running at port 8000
<-- GET /kapis/monitoring.kubesphere.io/v1alpha3/namespaces/monolith/pods?cluster=default&ownerKind=ReplicaSet&labelSelector=app%3Dmonolith-web&resources_filter=monolith-web-7fb9f67cfc-xqrv7%24&metrics_filter=pod_cpu_usage%7Cpod_memory_usage_wo_cache%24 2024/03/20T13:55:01.864
2、使用kubectl命令describe ks-console 的pod,可以发现 存活探针探测8000端口超时
node-role.kubernetes.io/master:NoSchedule
node.kubernetes.io/not-ready:NoExecute for 60s
node.kubernetes.io/unreachable:NoExecute for 60s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Pulled 16m (x75 over 9d) kubelet, k8s-prod1 Container image "harbor.ele-cloud.com:1080/kubesphereio/kubesphere/ks-console:v3.1.1" already present on machine
Warning Unhealthy 6m44s (x629 over 2d2h) kubelet, k8s-prod1 Liveness probe failed: dial tcp 172.19.0.157:8000: connect: connection timed out
Warning BackOff 98s (x892 over 5h7m) kubelet, k8s-prod1 Back-off restarting failed container