Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GCP Kubernetes在系统上的行为。退出(1)_Kubernetes_Google Cloud Platform - Fatal编程技术网

GCP Kubernetes在系统上的行为。退出(1)

GCP Kubernetes在系统上的行为。退出(1),kubernetes,google-cloud-platform,Kubernetes,Google Cloud Platform,当发生以下情况时,Spring引导应用程序的GCP Kubernetes的默认行为是什么 System.exit1 叫什么名字?库伯内特斯会再造这个容器吗? 如果否-如果我的应用程序崩溃,如何强制重新创建 -Alex关于应用程序的退出代码,kubernetes将重新启动POD内的容器,POD状态将更改为in Ready(就绪)列 如果您想优雅地终止pod,可以查看以下内容:https://dzone.com/articles/gracefully-shutting-down-java-in-co

当发生以下情况时,Spring引导应用程序的GCP Kubernetes的默认行为是什么

System.exit1

叫什么名字?库伯内特斯会再造这个容器吗? 如果否-如果我的应用程序崩溃,如何强制重新创建


-Alex

关于应用程序的退出代码,kubernetes将重新启动POD内的容器,POD状态将更改为in Ready(就绪)列

如果您想优雅地终止pod,可以查看以下内容:https://dzone.com/articles/gracefully-shutting-down-java-in-containers

请查看kubernetes官方文件:

Terminated: Indicates that the container completed its execution and has stopped running. A container enters into this when it has successfully completed execution or when it has failed for some reason. Regardless, a reason and exit code is displayed, as well as the container’s start and finish time. Before a container enters into Terminated, preStop hook (if any) is executed.

...
      State:          Terminated
        Reason:       Completed
        Exit Code:    0
        Started:      Wed, 30 Jan 2019 11:45:26 +0530
        Finished:     Wed, 30 Jan 2019 11:45:26 +0530
    ...