Container termination exit code 143 and reason "Error"

Hi all!
I have a Pod with a Java application running, but sometimes (not always) when I run a ‘kubectl apply’ changing the deployment, the pod terminates with “Reason: Error” and “Exit code: 143” on the application container. The new pod is created successfully and everything ends whith no problems.

The 143 exit code is related to a SIGTERM sended to the application container. But the container shutdown gracefully (even the logs are clean).
Despite this, the termination reason is still “Error”

This situation causes some alarms to be lanunched, but the pod was redeployed successfully

What is the reason for that? Or is there a way to prevent the 143 exit code?

Thanks in advance to all!

Cluster information:

Kubernetes version: 1.21

bump this question :wink:

Is this problem solved?

I have the same problem

143 = 128 (signal) + 15 (SIGTERM, I am 99% sure).

Most likely this is your pod being deleted, which is what happens when a deployment is updated.

Hi @thockin !
Is that exact situation you said. It occurs when the pod is deleted by a deployment update.
The question is why the pod termination reason is “Error” in those cases since there is no error in this case.

Thanks for the reply!