Failsave Kubernetes with preemtible VMs in Google Cloud

2/8/2019

Google has an offer called preemptible VMs which are VMs that do not guarantee to be available all the time and which are shut down once every 24 hours.

Our goal is to deploy a failsave (to a certain degree) kubernetes cluster with those VM by having enough backup VMs to handle the case that one VM is shutdown. This article describe a simple scenario where preemptible VMs are used to run an image service. This scenario is simple because there is no database or message broker involved running on preemptible VMs.

Is it possible to run a whole (microservice-based) application including databases and message brokers with only preemptible VMs?

Further Questions that we have:

  1. When do the preemptible VMs get shut down usually? Is it usually the case that if one VM gets shut down, all the other are too (at the same time)?
  2. How log is the downtime of a preemptible VM getting restarted?

Any guidance that helps answering those questions and/or helping us configure such a cluster is apprechiated.

-- user2074945
google-cloud-platform
google-kubernetes-engine
kubernetes

1 Answer

2/8/2019

Regarding your questions:

1.-When do the preemptible VMs get shut down usually? Is it usually the case that if one VM gets shut down, all the other are too (at the same time)?

A:The lifetime for preemptible VMs is no more than 24 hours, they can be shutdown whenever Google need the resources between this lifetime, find more information about limitations here. Resetting the counter means that you manually stop and start the instances, however keep in mind that the selection will preempt instances that were recently launched most recently.

2.-How log is the downtime of a preemptible VM getting restarted?

A: If you mean where you can see the logs of Compute Engine that notices you when an instance was terminated, you can use Stackdriver Logging.

-- kornshell93
Source: StackOverflow