GKE master upgrade is inevitable as it contains new fixes for bugs, implementing new feature as per customer's needs etc. This Upgrades can occur on any day of the week, and at any time within the timeframe. However, you could control this upgrade with the help of a)
Maintenance Window OR b)
Maintenance exclusion OR c)
Manual upgrade.
By configuring a
maintenance window, could give you more control over when upgrades to the Kubernetes software on your cluster or nodes occur. As explained
here, maintenance window is an arbitrary, repeating window of time during which automatic maintenance are permitted. A detailed example on how to configure one such maintenance window for an existing cluster is provided
here.
You may also further configure a maintenance exclusion window for your GKE Cluster that also could prevent the auto-upgrade in the exclusion window period. A maintenance exclusion is an arbitrary non-repeating window of time during which automatic maintenance is forbidden.You can find more information about configuring a maintenance exclusion in
this help center article. Please refer the example provided
here for an additional reference as well.
A third approach is to
manually upgrade your cluster at your preferred time. Manual upgrades begin immediately and ignore any maintenance windows. If you have a test cluster(in your case, your non-prod cluster), I would recommend you to do a manual upgrade on that cluster and see if there is an issue after the manual upgrade. If everything goes well, you can immediately start the manual upgrade on your production environment.
Finally, you could also makes your services highly available by deploying it in a '
Regional cluster' because auto-upgrades are minimally disruptive, especially for regional clusters. For a regional cluster, the cluster will remains as highly available during the upgrade. You can find more information about regional cluster and its upgrade in
this help center article.