I'm new to Kubenetes, and would like to clarify the following.
Assume we have a containerized java program (using docker) running in k8s. I need to stop getting requests to a pod when the heap size consumed by JVM reaches a limit. For that can I set the readiness and liveliness probes to certain values, so that I want get further requests to that pod? If so how can I set those values?
Thank you
Yes this is possible. K8s livinessProbes can be a command.
for instances.
livenessProbe:
exec:
command:
- /bin/sh
- -c
- /home/test/check.sh
If you then write a script that checks the used heap by the JVM you should have the probe that you want.