I like to change the Kubernetes control manager --terminated-pod-gc-threshold 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 ?
Also is there any way we can find/calculate this value required for a cluster ?
Any help appreciated.
Yes, there is an appropriate Issue #78693 and PR #79047
// 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
}
}
PR is not accepted yet.