I have a Java program which exits with code 0 or 1 to identify whether the process is successful. I want to use kubectl run to run it in a remote kubernetes cluster. It works fine but how could I get the Java program exit code then. Because no matter how the Java program exits, the pod is always successful. I have to use interactive mode because it gives me logs when running. Is there any way that I can get the exit code? Or is there any way that a Java program to escalate its exit code to the pod system?