'GCK Preemptible Node AGE shows 6days

As per the GKE documentation, preemptible VMs only last for up to 24 hours after creation. However, in our GKE cluster where we have node-pool with preemtible instances we see that age of the nodes in kubectl get nodes command is more than 24HRs, 6days,7Days etc. Does it mean that those nodes have not got deleted, is there any other condition which decides whether to delete a node or not. GKE Documentation

Node-pool with pre-emptible provisioning on

kubectl get nodes output get nodes output with Age highlighted

are we missing something here?



Solution 1:[1]

I bet if you look at the underlying VMs, their creation time is going to be within the last 24 hours.

Even though the instances are newly created, the GKE nodes may be older, as node names generally stay the same if and when they are replaced after preemption.

GCE instance uptime is based on how long the instance has been active. If an instance was deleted and created or started up from a stopped state, the start time determines the instance uptime.

GKE node time is based on how long the kubelet has existed. If the kubelet restarts, then the control plane assumes that the node restarted.

When the node preempts, the kubelet is terminated and restarted in the new instance. Since both instances have the same name, the GKE control plane will believe that the kubelet has simply restarted, and assumes that the node has existed for the entire time, and just that the kubelet and pods have restarted.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jabbson