简体   繁体   中英

GKE Kubernetes - How to automate pod restart on uptime alert failure

I'm working on a website based in Google's Kube.netes

Our system has a workload that is for our main website. Right now I have an uptime alert that will send me an text/email.

Under some very rare circumstances, the site will go down and the only way to fix this is to delete the pod that the web service is running on. It'll then recreate itself and be back up and running.

However, I have to do this manually. If I'm away from the computer, or not available for some reason, the site will stay down until I'm available to delete the pod and let it restart.

I would like this to be automated. Is there a way to configure something like this? Some process that, if there is an uptime alert failure, it'll automatically delete the web service pod(s) so that they recreate themselves?

I would like this to be automated. Is there a way to configure something like this? Some process that, if there is an uptime alert failure, it'll automatically delete the web service pod(s) so that they recreate themselves?

If Kube.netes can detect this situation, you can use a Liveness probe for this situation, and the Pod will be deleted (and re-created) if the probe fails.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM