Reputation: 574
I have a deployment with two containers, let's say A and B.
container A
serves http requests, the important container in the deployment. has liveness and readiness probes properly set.
Container B
serves as a proxy to a certain third party service through an ssh tunnel, has a very specific usecase, but for whatever reason, the third party service can be unreachable which puts this container on a crash loop.
The question is: How can I make this pod serve requests even if Container B
is on a crashloop?
TLDR; How to make a deployment serve requests if a specific container is on a crashloop?
Upvotes: 0
Views: 51
Reputation: 54267
You kind of can't. You could remove the readiness probe from B but any kind of crash is assumed to be bad. Probably your best bet is to change B so that it doesn't actually crash out to where the kubelet can see it. Like put a little while true; do theoriginalcommand; sleep 1; done
bash loop on it or something so the kubelet isn't aware of it crashing. Or just make it not crash ...
Upvotes: 1