<p>In <strong>kubernetes</strong>, if a pod go down for some reason, the admission controller will restart it.</p>
<p>We call this mecanism self healing.</p>
<p>I have never worked with <strong>docker-compose</strong>, but I wonder : is it the same ?</p>

Will
<p>When deployed with <code>docker-compose</code> or now <code>docker compose</code> (with a space) you are deploying to a single node. You can define the service to automatically restart with a <a href="https://docs.docker.com/compose/compose-file/compose-file-v3/#restart_policy" rel="nofollow noreferrer">restart policy</a> that handles a crashing application. However, there are a few scenarios where externalities like the network or volumes are not in a good state which I've seen cause the definition to be considered invalid by docker at which point it stops attempting to restart the service.</p>
<p>There's also Swarm Mode which is an orchestrator like Kubernetes, it can use the <code>docker-compose.yml</code> to define the target state, and it will continue to restart services to recover from an outage, and migrate them to another node when a node in the cluster goes down.</p>
