Exit state docker container

how long does an exit state docker container stays in the system till its deleted from node?
where is this default time set and how to change or increase the time duration?

Please provide context.

Hi @meyay thanks for your response
I have k8s job configured and pod gets created on scheduled time for the jobs.
When pod status change to completed state we need to fetch the logs of that specific pod.
When we are checking the logs we are unable to get the same as the container is deleted from the node.
For few pods we could able to fetch the logs as the container stays there in exited state
for jobs running every 10 minutes we are able to fetch logs but for jobs which is executing every alternate days we are unable to fetch logs.
So I need to know how long does a container stays in the node in exited status?

How long kubernetes stores pod stdout logs and how and where to configure the log retention time?