Determining the cause of kubernetes pod restart
Your can check crashed pod log by running
$ kubectl logs -f <pod name> -n <namespace> --previous
The pod could have been terminated for reasons like out of memory. Use kubectl describe pod <podname>
which contains the information.
There should be output like this (could also be a different reason than OOM):
Last State: Terminated Reason: OOMKilled