Connection refused to 27017 error periodically

i have mongodb in kubernetes

  1. there is a issue that i have no logs in /var/log inside mongodb container
    but I am experiencing connection refused to 27017 error periodically (once in a week)

2, How can i find cause of temporarily service unavailability to connect error
may be timeout for connection have a role
or it may occur during primary-secondary election
Please help me, where i can see events concerning functioning of mongodb
how to debug this problem?
how to turn on logs in kube pods containers ?