Kubernetes python pod profiling

11/29/2019

I am running python pod on Kubernetes and only one main pod keeps restarting.

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

Using flask with python-3.5 & socket.io.

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.

I am getting Terminated with code 137.

Thanks in advance

-- Harsh Manvar
docker
google-cloud-platform
google-kubernetes-engine
kubernetes
python

1 Answer

11/29/2019

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.

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.

Have a look at the documentation:

-- Pievis
Source: StackOverflow