How is the preemption notice handled?

More recent and relevant answer

There's a GitHub project (not mine) that catches this ACPI handler and has the node cordon and drain itself, and then restart itself which in our tests results in a much cleaner preemptible experience, it's almost not noticeable with a highly available deployments on your cluster.

See: https://github.com/GoogleCloudPlatform/k8s-node-termination-handler


Yes you are right, so far there is no built in way to handle ACPI G2 Soft Off.

Notice that if normal preemptible instance supports shutdown scripts (where you could introduce some kind of logic to perform drain/cordon), this is not the case if they are Kubernetes nodes:

Currently, preemptible VMs do not support shutdown scripts.

You can perform some test but quoting again from documentation:

You can simulate an instance preemption by stopping the instance.

And so far if you stop the instance, even if it is a Kubernetes node no action is taken to cordon/drain and gratefully remove the node from the cluster.

However this feature is still in beta therefore it is at its early stage of life and in this moment it is a matter of discussion if and how introduce this feature.

Disclaimer: I work For Google Cloud Platform Support