Kubernetes liveness probe restarted container keeps failing to access some resources

540 Views Asked by At

There are kubernetes microservices (written in .net core 3.1) having liveness probe. When this liveness probe detects some other external resources (e.g. redis, rabbitmq) not accessible, kubernetes restarts the container of the services. The restart mechanism works as expected.

The problem is that after kube restarted the service container, the service still cannot connect to the resource. It seems that connection issues cannot be fixed with kube liveness restart. The only solution (workaround) in this situation is the service re-deployment. If the particular service is re-deployed, the connection problem will stop right away.

What is the difference between a service deployment and liveness probe restart that makes the connection work again in case of deployment?

0

There are 0 best solutions below