<p>I like to change the Kubernetes control manager <strong>--terminated-pod-gc-threshold</strong> value from the default 12500 pods to a lower value (Like 100 or 50) in my kubernetes cluster. Setting this flag to a small one will cause any issues ? Why kubernetes itself set it to a very high value by default. Is that purposefully set ?</p>

<p>Also is there any way we can find/calculate this value required for a cluster ?</p>

<p>Any help appreciated. </p>

Jyothish
<p>Yes, there is an appropriate <a href="https://github.com/kubernetes/kubernetes/issues/78693" rel="nofollow noreferrer">Issue #78693</a> and <a href="https://github.com/kubernetes/kubernetes/pull/79047" rel="nofollow noreferrer">PR #79047</a></p>
<p><a href="https://github.com/kubernetes/kubernetes/pull/79047/files" rel="nofollow noreferrer">Changed the default terminated-pod-gc-threshold to 500 by hpandeycodeit · Pull Request #79047 · kubernetes/kubernetes</a></p>
<pre class="lang-golang prettyprint-override"><code>// run it in your wrapper struct of this type in its \`SetDefaults_\` method.
func RecommendedDefaultPodGCControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.PodGCControllerConfiguration) { 
  if obj.TerminatedPodGCThreshold == 0 { 
    obj.TerminatedPodGCThreshold = 500 
  } 
}
</code></pre>
<p>PR is <a href="https://github.com/kubernetes/kubernetes/pull/79047#issuecomment-506541717" rel="nofollow noreferrer">not accepted</a> yet.</p>
<p>UPD issue is closed and PR not merged too.</p>
