<p>I want the pods running in my cluster to save their logs just before termination somewhere, so that I can access these logs later and know the termination reason. <br />
Can this be accomplished using the PreStop hook? If yes, please guide me how to do so. <br />
Any other approaches are also welcomed.</p>

Tanishq Gupta
<p>Use fluentd or fluent bit to send logs to a log aggregator system such as elastic search(EFK stack) or splunk.</p>

<p>Fluentd can run as daemonset in each node and send logs to EFK/Splunk.</p>

<p>Fluentbit can  run as a sidecar and send logs to EFK/Splunk</p>

<p><a href="https://kubernetes.io/docs/concepts/cluster-administration/logging/#basic-logging-in-kubernetes" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/cluster-administration/logging/#basic-logging-in-kubernetes</a></p>
