I am fairly new to docker, and am trying to devise a short-term fix to provide relief for a cluster container whose JVM is leaking memory. To do this, I am following this guide to add a liveness probe to the .manifest file in the cluster's apiserver.
My plan is for the liveness prob to run an execAction
command that will look up the container id and determine the relative memory usage of its JVM; if this usage surpasses 85%, then it will fail the liveness prob, which will restart the container and thus reset the memory.
I currently have this outline in my manifest:
livenessProbe:
exec:
command:
-
initialDelaySeconds:
periodSeconds:
I am struggling to find the appropriate command to include that will determine the JVM memory usage in the way I described above and would appreciate some guidance.