<p>I am running python pod on Kubernetes and only one main pod keeps restarting.</p>

<p>Memory is increasing continuously so that k8s restart it as implemented liveness, readiness there.</p>

<p>Using flask with python-3.5 &amp; socket.io. </p>

<p>Is there any way i can do profiling on Kubernetes pod without doing code changes using installing any agent or any how. Please let me know. </p>

<p>I am getting Terminated with code 137.</p>

<p>Thanks in advance</p>

<p>You are using GKE right ? 
You should use stackriver monitoring in order to profile, capture, analyze metrics and strackdriver logs in order to understand what's happening. </p>

<p>Stackdriver Kubernetes Engine Monitoring is the default option, starting with GKE version 1.14. It's really intuitive but some knowledge and understanding of the platform is required. You should be able to create a graph based on memory utilization.</p>

<p>Have a look at the documentation:</p>

<ul>
<li><a href="https://cloud.google.com/monitoring/kubernetes-engine/" rel="nofollow noreferrer">Stackdriver support for GKE</a></li>
<li><a href="https://cloud.google.com/monitoring/" rel="nofollow noreferrer">Stackdriver monitoring</a></li>
</ul>
