<p>I would like to set the value of <code>terminationMessagePolicy</code> to <code>FallbackToLogsOnError</code> by default for all my pods.</p>
<p>Is there any way to do that?</p>
<p>I am running Kubernetes 1.21.</p>

ITChap
<p>Community wiki answer to summarise the topic.</p>
<p>The answer provided by the <a href="https://stackoverflow.com/users/14704799/gohmc">gohm'c</a> is good. It is not possible to change this value from the cluster level. You can find more information about it <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/_print/#customizing-the-termination-message" rel="nofollow noreferrer">in the official documentation</a>:</p>
<blockquote>
<p>Moreover, users can set the  <code>terminationMessagePolicy</code>  field of a Container for further customization. This field defaults to &quot;<code>File</code>&quot; which means the termination messages are retrieved only from the termination message file. By setting the  <code>terminationMessagePolicy</code>  to &quot;<code>FallbackToLogsOnError</code>&quot;, you can tell Kubernetes to use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller.</p>
</blockquote>
<p>See also this page about <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#podspec-v1-core" rel="nofollow noreferrer">Container v1 core API</a> for 1.21 version. You can find there information about <code>terminationMessagePolicy</code>:</p>
<blockquote>
<p>Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.</p>
</blockquote>
<p>This can be done only from the Container level.</p>
