Find out why a Kubernetes cluster was restarted on Google Cloud
This has happened twice in the last two months - during a weekend the entire GKE cluster is restarted.
It happens even though the cluster is set to manual upgrade (release channel is set to "None").
Is there a way to find out why the GKE cluster was restarted?
As stated in documentation:
No channel
Regardless of whether your cluster is enrolled in a release channel or not, cluster control planes are always upgraded on a regular basis.
. . .
Automatic upgrades are typically performed in stages over multiple weeks. Infrastructure security is high priority for GKE, and as such control planes are upgraded on a regular basis, and cannot be disabled. However, you can apply maintenance windows and exclusions to temporarily suspend upgrades for control planes and nodes.
Use gcloud container operations list --filter="TYPE:UPGRADE_MASTER"
to see recent control plane upgrades:
$ gcloud container operations list --filter="TYPE:UPGRADE_MASTER"
NAME TYPE LOCATION TARGET STATUS_MESSAGE STATUS START_TIME END_TIME
operation-1631397153397-fc924191 UPGRADE_MASTER us-west1-b prod DONE 2021-09-11T22:05:53.397098204Z 2021-09-11T22:10:04.559303783Z