Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect GKE autoupgrading a node in Stackdriver logs

We have a GKE cluster with auto-upgrading nodes. We recently noticed a node become unschedulable and eventually deleted that we suspect was being upgraded automatically for us. Is there a way to confirm (or otherwise) in Stackdriver that this was indeed the cause what was happening?

like image 330
Matt R Avatar asked Jun 24 '19 15:06

Matt R


1 Answers

You can use the following advanced logs queries with Cloud Logging (previously Stackdriver) to detect upgrades to node pools:

protoPayload.methodName="google.container.internal.ClusterManagerInternal.UpdateClusterInternal"
resource.type="gke_nodepool"

and master:

protoPayload.methodName="google.container.internal.ClusterManagerInternal.UpdateClusterInternal"
resource.type="gke_cluster"

Additionally, you can control when the update are applied with Maintenance Windows (like the user aurelius mentioned).

like image 152
David C Avatar answered Oct 13 '22 01:10

David C