1
有沒有辦法知道爲什麼Kubernetes正在終止吊艙?Kubernetes在日誌中沒有明確的原因終止吊艙
如果我去Logging
在谷歌控制檯,唯一的消息我能找到與此相關的事件是:
shutting down, got signal: Terminated
此外,在狀態Terminating
豆莢從來沒有被終止,他們幾個是在這種狀態下超過24小時。我不使用livenessProbes
或readinessProbes
。
我使用terminationGracePeriodSeconds: 30
編輯:添加的kubectl describe pod <podname>
吊艙的結果是9小時後進行Terminating
狀態截至目前:
Name: storeassets-5383k
Namespace: default
Node: gke-recommendation-engin-default-pool-c9b136a8-0qms/10.132.0.85
Start Time: Sat, 11 Mar 2017 06:27:32 +0000
Labels: app=storeassets
deployment=ab08dc44070ffbbceb69ff6a5d99ae61
version=v1
Status: Terminating (expires Tue, 14 Mar 2017 01:30:48 +0000)
Termination Grace Period: 30s
Reason: NodeLost
Message: Node gke-recommendation-engin-default-pool-c9b136a8-0qms which was running pod storeassets-5383k is unresponsive
IP: 10.60.3.7
Controllers: ReplicationController/storeassets
Containers:
storeassets:
Container ID: docker://7b38f1de0321de4a5f2b484f5e2263164a32e9019b275d25d8823de93fb52c30
Image: eu.gcr.io/<project-name>/recommendation-content-realtime
Image ID: docker://sha256:9e8cf1b743f94f365745a011702a4ae1c2e636ceaaec4dd8d36fef6f787aefe7
Port:
Command:
python
-m
realtimecontent.storeassets
Requests:
cpu: 100m
State: Running
Started: Sat, 11 Mar 2017 06:27:33 +0000
Ready: True
Restart Count: 0
Volume Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-qwfs4 (ro)
Environment Variables:
RECOMMENDATION_PROJECT: <project-name>
RECOMMENDATION_BIGTABLE_ID: recommendation-engine
GOOGLE_APPLICATION_CREDENTIALS: recommendation-engine-credentials.json
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
default-token-qwfs4:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-qwfs4
QoS Class: Burstable
Tolerations: <none>
No events.
爲什麼你不使用探針? 'kubectl describe pod' –
Aleksandar
'的輸出結果我正在使用針對公開API的應用程序的探針,但是這個終止的特定pod沒有API。儘管如此,你建議的命令已經幫助了我。看起來應用程序只是以狀態碼0結束,並且pod正在重新啓動。不幸的是,這些信息似乎並未顯示在Kubernetes日誌中。 – cahen
不錯,heare ;-) – Aleksandar