kubernetes - Pod 错误:在我的 cont 上部署 mojaloop 后来自 kubernetes 的 CrashLoopBackOff
问题描述
在我的 Kubernetes cont 上部署 mojaloop 后,一些 mojaloop 服务显示状态为 crashloopback
sudo kubectl describe pod moja-centraldirectory-ff9d88c44-rrm2q --namespace demo
Name: moja-centraldirectory-ff9d88c44-rrm2q
Namespace: demo
Priority: 0
Node: mojaloop/178.128.166.214
Start Time: Fri, 01 Nov 2019 11:53:20 +0000
Labels: app=moja-centraldirectory
chart=centraldirectory-3.4.2
heritage=Tiller
pod-template-hash=ff9d88c44
release=moja
Annotations: cni.projectcalico.org/podIP: 192.168.80.147/32
Status: Running
IP: 192.168.80.147
Controlled By: ReplicaSet/moja-centraldirectory-ff9d88c44
Init Containers:
wait-for-postgres:
Container ID: docker://533d708b40eac27be3f1c73fa8403bc03573214622980ca7a8da71edf89f3fa5
Image: bowerswilkins/awaitpostgres
Image ID: docker-pullable://bowerswilkins/awaitpostgres@sha256:62b93d2fb6d05e7a0a39f40895df59c5f7e80d4292690709b374d66f5456e911
Port: <none>
Host Port: <none>
State: Terminated
Reason: Completed
Exit Code: 0
Started: Tue, 05 Nov 2019 06:05:39 +0000
Finished: Tue, 05 Nov 2019 06:05:39 +0000
Ready: True
Restart Count: 5
Environment:
POSTGRES_URL: postgresql://central-directory:gR5hARbsfa@moja-centraldirectory-postgresql:5432/central_directory?sslmode=disable
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-5v2gl (ro)
Containers:
centraldirectory:
Container ID: docker://5936901d7eb7848362b8317866143ce9b13c7c096c6a318e78af6825d0d38cc8
Image: mojaloop/central-directory:v2.4
Image ID: docker-pullable://mojaloop/central-directory@sha256:c25ca28a13dfbaca8590f7a9fb512a09f42b389c2ff5ab63edb2b829fda319ae
Port: 3000/TCP
Host Port: 0/TCP
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Completed
Exit Code: 0
Started: Tue, 05 Nov 2019 06:06:32 +0000
Finished: Tue, 05 Nov 2019 06:06:32 +0000
Ready: False
Restart Count: 1062
Liveness: http-get http://:3000/health delay=60s timeout=1s period=15s #success=1 #failure=3
Readiness: http-get http://:3000/health delay=60s timeout=1s period=15s #success=1 #failure=3
Environment:
CDIR_DATABASE_URI: <set to the key 'db.uri' in secret 'moja-centraldirectory'> Optional: false
CDIR_ADMIN_KEY: <set to the key 'cdir.admin.key' of config map 'moja-centraldirectory'> Optional: false
CDIR_ADMIN_SECRET: <set to the key 'cdir.admin.secret' of config map 'moja-centraldirectory'> Optional: false
CDIR_PATHFINDER__PROVISIONING__ADDRESS: <set to the key 'cdir.pathfinder.provisioning.address' of config map 'moja-centraldirectory'> Optional: false
CDIR_PATHFINDER__QUERY__ADDRESS: <set to the key 'cdir.pathfinder.query.address' of config map 'moja-centraldirectory'> Optional: false
CDIR_PATHFINDER__QUERY__PORT: <set to the key 'cdir.pathfinder.query.port' of config map 'moja-centraldirectory'> Optional: false
Mounts:
/opt/central-directory/config from moja-centraldirectory-config-volume (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-5v2gl (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
moja-centraldirectory-config-volume:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: moja-centraldirectory
Optional: false
default-token-5v2gl:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-5v2gl
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning BackOff 8m10s (x4393 over 15h) kubelet, mojaloop Back-off restarting failed container
Warning FailedMount 2m56s kubelet, mojaloop MountVolume.SetUp failed for volume "default-token-5v2gl" : couldn't propagate object cache: timed out waiting for the condition
Warning FailedMount 2m55s (x2 over 2m56s) kubelet, mojaloop MountVolume.SetUp failed for volume "moja-centraldirectory-config-volume" : couldn't propagate object cache: timed out waiting for the condition
Normal SandboxChanged 2m20s (x2 over 2m53s) kubelet, mojaloop Pod sandbox changed, it will be killed and re-created.
Warning BackOff 113s kubelet, mojaloop Back-off restarting failed container
Normal Pulling 98s (x2 over 2m18s) kubelet, mojaloop Pulling image "bowerswilkins/awaitpostgres"
Normal Pulled 97s (x2 over 2m16s) kubelet, mojaloop Successfully pulled image "bowerswilkins/awaitpostgres"
Normal Created 96s (x2 over 2m16s) kubelet, mojaloop Created container wait-for-postgres
Normal Started 96s (x2 over 2m15s) kubelet, mojaloop Started container wait-for-postgres
Normal Pulling 76s (x2 over 96s) kubelet, mojaloop Pulling image "mojaloop/central-directory:v2.4"
Normal Pulled 75s (x2 over 94s) kubelet, mojaloop Successfully pulled image "mojaloop/central-directory:v2.4"
Normal Created 75s (x2 over 94s) kubelet, mojaloop Created container centraldirectory
Normal Started 74s (x2 over 94s) kubelet, mojaloop Started container centraldirectory
Warning BackOff 73s (x3 over 91s) kubelet, mojaloop Back-off restarting failed contain
pod 正在回复 crashloopback 的状态 上面的日志是在描述 moja-centraldirectory-ff9d88c44-rrm2q 的 pod 时输出的,我是 kubernttes 的新手,如果有人能在这个问题上帮助我,我会很高兴
解决方案
推荐阅读
- android - 如何在android上录制方形视频?
- javascript - ng2-select2 无法选择特定选项
- angular - 侦听文档和该文档的子集合中的更改
- javascript - 如何排除日期之间的周末以获得总天数,并且可以排除联邦假期吗?
- computational-geometry - 如何知道数据集采用的 XYZ 坐标系的约定?
- android - Android webview 中的语音合成
- r - 4d 曲面图逻辑回归(x、y、z、颜色)
- c# - 在协程中实例化 GameObject 时出现无限问题
- docker-compose - 一个 docker-compose 文件中的两个网络
- javascript - 这。引用 Object 而不是 Window-Object