K8s/Openshift - does the replication controller care about exit status of pod/containers? K8s/Openshift - does the replication controller care about exit status of pod/containers? kubernetes kubernetes

K8s/Openshift - does the replication controller care about exit status of pod/containers?


A thing i want to confirm, if the Pod/Container exists with an error - then will the replication controller care about the error code and find that the pod is failing due to error and hence decide to not start the pod any further. ??

Errors can be shown in many different ways:

  • Error code in the application log
  • Error code in message payload
  • Error code in http status code in response
  • Process exit code

Only the last - process exit code is helpful for the ReplicationController (or in newer Kubernetes, the ReplicaSet controller). If the process exit, the Pod is terminated and a new will be created by the controller.

In addition, to mitigate the other cases, you can implement a LivenessProbe, so that the Pod will be killed in the presence of another kind of error.