All pods are notified via SIGTERM that they should shut down. You can also register a pre-stop hook in the pod definition that is given a chance to run before SIGTERM is sent. You must set a longer terminationGracePeriodSeconds if you need more than the default 30s:$ oc explain pod.spec.
terminationGracePeriodSecondsFIELD: terminationGracePeriodSeconds <integer>DESCRIPTION:Optional duration in seconds the pod needs to terminate gracefully. May bedecreased in delete request. Value must be non-negative integer. The valuezero indicates delete immediately. If this value is nil, the default graceperiod will be used instead. The grace period is the duration in secondsafter the processes running in the pod are sent a termination signal and thetime when the processes are forcibly halted with a kill signal. Set thisvalue longer than the expected cleanup time for your process. Defaults to 30seconds.$ oc explain pod.spec.containers.lifecycle. preStopRESOURCE: preStop <Object>DESCRIPTION:PreStop is called immediately before a container is terminated. Thecontainer is terminated after the handler completes. The reason fortermination is passed to the handler. Regardless of the outcome of thehandler, the container is eventually terminated. Other management of thecontainer blocks until the hook completes. More info: http://Handler defines a specific action that should be takenFIELDS:tcpSocket <Object>TCPSocket specifies an action involving a TCP port. TCP hooks not yetsupportedexec <Object>One and only one of the following should be specified. Exec specifies theaction to take.httpGet <Object>HTTPGet specifies the http request to perform.Note that "other management of he container blocks until the hook completes" means other actions taken by kube against the pod. The grace period still applies (you will be terminated after that duration).On Wed, Sep 7, 2016 at 9:54 PM, Frank Liauw <frank vsee com> wrote:______________________________ _________________
users mailing list
users lists openshift redhat c