eip-work / kuboard-press

Kuboard 是基于 Kubernetes 的微服务管理界面。同时提供 Kubernetes 免费中文教程,入门教程,最新版本的 Kubernetes v1.23.4 安装手册,(k8s install) 在线答疑,持续更新。
https://kuboard.cn/
21.78k stars 1.49k forks source link

kubectl apply 安装后 只有2个pod 并且状态时CrashLoopBackOff #415

Open AlexDingSZ opened 1 year ago

AlexDingSZ commented 1 year ago

kubectl apply 安装后 只有2个pod 并且状态时CrashLoopBackOff,查看日志,说连不到json http://10.244.206.195:80/kuboard-resources/version.json

kubectl apply -f https://addons.kuboard.cn/kuboard/kuboard-v3.yaml kubectl apply -f https://addons.kuboard.cn/kuboard/kuboard-v3-swr.yaml

[root@k8s-test-master ~]# kubectl get pods -n kuboard NAME READY STATUS RESTARTS AGE kuboard-etcd-6n47c 1/1 Running 0 20m kuboard-v3-666bbb4d8c-5lpg8 0/1 Running 9 (36s ago) 20m

[root@k8s-test-master ~]# kubectl describe pods kuboard-v3-666bbb4d8c-5lpg8 -n kuboard Name: kuboard-v3-666bbb4d8c-5lpg8 Namespace: kuboard Priority: 0 Service Account: kuboard-boostrap Node: k8s-test-node1/172.30.9.23 Start Time: Wed, 24 May 2023 08:55:23 +0800 Labels: k8s.kuboard.cn/name=kuboard-v3 pod-template-hash=666bbb4d8c Annotations: cni.projectcalico.org/containerID: 3f4750bba55733ac9843f52d1536417e7a062901bd61ef2aab58dafefe8de3b3 cni.projectcalico.org/podIP: 10.244.206.195/32 cni.projectcalico.org/podIPs: 10.244.206.195/32 Status: Running IP: 10.244.206.195 IPs: IP: 10.244.206.195 Controlled By: ReplicaSet/kuboard-v3-666bbb4d8c Containers: kuboard: Container ID: containerd://0373a76075aa40efdcc538a63675cd9502bb37c0762872f82e3f884e19df0c58 Image: swr.cn-east-2.myhuaweicloud.com/kuboard/kuboard:v3 Image ID: docker.io/eipwork/kuboard@sha256:5e121a0eea2a4977e160ed09963195178978f5ec58cc0e9accb36d95e0454397 Ports: 80/TCP, 443/TCP, 10081/TCP, 10081/UDP Host Ports: 0/TCP, 0/TCP, 0/TCP, 0/UDP State: Waiting Reason: CrashLoopBackOff Last State: Terminated Reason: Error Exit Code: 137 Started: Wed, 24 May 2023 09:07:32 +0800 Finished: Wed, 24 May 2023 09:08:54 +0800 Ready: False Restart Count: 7 Liveness: http-get http://:80/kuboard-resources/version.json delay=30s timeout=1s period=10s #success=1 #failure=3 Readiness: http-get http://:80/kuboard-resources/version.json delay=30s timeout=1s period=10s #success=1 #failure=3 Environment Variables from: kuboard-v3-config ConfigMap Optional: false Environment: HOSTIP: (v1:status.hostIP) HOSTNAME: (v1:spec.nodeName) Mounts: /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-qz5g7 (ro) Conditions: Type Status Initialized True Ready False ContainersReady False PodScheduled True Volumes: kube-api-access-qz5g7: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: DownwardAPI: true QoS Class: BestEffort Node-Selectors: Tolerations: node-role.kubernetes.io/master op=Exists node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message


Normal Scheduled 18m default-scheduler Successfully assigned kuboard/kuboard-v3-666bbb4d8c-5lpg8 to k8s-test-node1 Normal Pulled 18m kubelet Successfully pulled image "swr.cn-east-2.myhuaweicloud.com/kuboard/kuboard:v3" in 300.163651ms (300.176242ms including waiting) Normal Killing 17m kubelet Container kuboard failed liveness probe, will be restarted Normal Pulling 16m (x2 over 18m) kubelet Pulling image "swr.cn-east-2.myhuaweicloud.com/kuboard/kuboard:v3" Normal Created 16m (x2 over 18m) kubelet Created container kuboard Normal Started 16m (x2 over 18m) kubelet Started container kuboard Normal Pulled 16m kubelet Successfully pulled image "swr.cn-east-2.myhuaweicloud.com/kuboard/kuboard:v3" in 284.941393ms (284.952145ms including waiting) Warning Unhealthy 15m (x6 over 17m) kubelet Liveness probe failed: Get "http://10.244.206.195:80/kuboard-resources/version.json": dial tcp 10.244.206.195:80: connect: connection refused Warning Unhealthy 12m (x27 over 17m) kubelet Readiness probe failed: Get "http://10.244.206.195:80/kuboard-resources/version.json": dial tcp 10.244.206.195:80: connect: connection refused Warning BackOff 2m59s (x24 over 8m46s) kubelet Back-off restarting failed container kuboard in pod kuboard-v3-666bbb4d8c-5lpg8_kuboard(9fa8eac0-e395-405c-8a4f-d99d6da348cb) [root@k8s-test-master ~]#

LiuTeacher commented 6 months ago

问题解决了吗