我在本地机器上的Virtual Box上创建了一个Minikube实例。我有几个复制控制器,为它们指定了资源限制。首先,我为每个复制控制器A和B创建一个实例。然后,我将rc B的复制计数增加到6。一旦将其向上扩展,我就可以看到由rc A创建的Pod被Kubernetes杀死。我只能在kubeclt日志中看到
/opt/app-server/bin/app-server.sh: line 159: 28 Killed $JAVA_HOME/bin/java -server $JVM_OPTS $XDEBUG $SERVER_OPTS -Djava.endorsed.dirs=$SERVER_ENDORSED -classpath $SERVER_CLASSPATH org.adroitlogic.appserver.AppServer我不知道是什么原因导致了这个吊舱的驱逐。我猜这与pod的资源分配和VM上的有限资源有关。但我需要确认一下。该实例被驱逐的原因日志在哪里?我在journalctl -u上搜索了一下
Jan 09 11:00:55 minikube localkube[3421]: I0109 11:00:55.136114 3421 docker_manager.go:2524] checking backoff for container "ipsweb" in pod "ipsweb-m3234"
Jan 09 11:00:55 minikube localkube[3421]: I0109 11:00:55.136525 3421 docker_manager.go:2538] Back-off 5m0s restarting failed container=ipsweb pod=ipsweb-m3234_default(e6961157-d650-11e6-8bee-080027bc9720)
Jan 09 11:00:55 minikube localkube[3421]: E0109 11:00:55.136571 3421 pod_workers.go:184] Error syncing pod e6961157-d650-11e6-8bee-080027bc9720, skipping: failed to "StartContainer" for "ipsweb" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=ipsweb pod=ipsweb-m3234_default(e6961157-d650-11e6-8bee-080027bc9720)"kubectl describe pod提供了以下事件
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
1h 1h 1 {kubelet minikube} spec.containers{ipsweb} Normal Started Started container with docker id 2ca5ccaa11a1
1h 1h 1 {kubelet minikube} spec.containers{ipsweb} Normal Created Created container with docker id 2ca5ccaa11a1; Security:[seccomp=unconfined]
1h 1h 1 {kubelet minikube} spec.containers{ipsweb} Normal Started Started container with docker id 86d4bdfa014e
1h 1h 1 {kubelet minikube} spec.containers{ipsweb} Normal Created Created container with docker id 86d4bdfa014e; Security:[seccomp=unconfined]
50m 50m 1 {kubelet minikube} spec.containers{ipsweb} Normal Started Started container with docker id a570e4f59e96
50m 50m 1 {kubelet minikube} spec.containers{ipsweb} Normal Created Created container with docker id a570e4f59e96; Security:[seccomp=unconfined]
1h 49m 2 {kubelet minikube} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "ipsweb" with CrashLoopBackOff: "Back-off 10s restarting failed container=ipsweb pod=ipsweb-m3234_default(e6961157-d650-11e6-8bee-080027bc9720)"
49m 49m 1 {kubelet minikube} spec.containers{ipsweb} Normal Started Started container with docker id b91cc20a8bb3
49m 49m 1 {kubelet minikube} spec.containers{ipsweb} Normal Created Created container with docker id b91cc20a8bb3; Security:[seccomp=unconfined]
1h 48m 4 {kubelet minikube} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "ipsweb" with CrashLoopBackOff: "Back-off 20s restarting failed container=ipsweb pod=ipsweb-m3234_default(e6961157-d650-11e6-8bee-080027bc9720)"
48m 48m 1 {kubelet minikube} spec.containers{ipsweb} Normal Started Started container with docker id cf24faa31718
48m 48m 1 {kubelet minikube} spec.containers{ipsweb} Normal Created Created container with docker id cf24faa31718; Security:[seccomp=unconfined]
1h 46m 7 {kubelet minikube} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "ipsweb" with CrashLoopBackOff: "Back-off 40s restarting failed container=ipsweb pod=ipsweb-m3234_default(e6961157-d650-11e6-8bee-080027bc9720)"但以上这些都没有给我一个关于原因和为什么会发生这种情况的提示。有什么建议吗?
https://stackoverflow.com/questions/41546810
复制相似问题