Overview
Node auto-upgrades help you keep the nodes in your cluster or node pool up to date with the latest stable version of Kubernetes. Auto-Upgrades use the same update mechanism as manual node upgrades.
Rationale
Node pools with auto-upgrades enabled are automatically scheduled for upgrades when a new stable Kubernetes version becomes available. When the upgrade is performed, the node pool is upgraded to match the current cluster master version. Some benefits of using enabling auto upgrades are:
- Lower management overhead: You don't have to manually track and update to the latest version of Kubernetes.
- Better security: Sometimes new binaries are released to fix a security issue. With auto-upgrades, Kubernetes Engine automatically ensures that security updates are applied and kept up to date.
- Ease of use: Provides a simple way to keep your nodes up to date with the latest Kubernetes features.
Remediation guidance
Using Console
- Go to Kubernetes GCP Console by visiting https://console.cloud.google.com/kubernetes/list?
- Select reported Kubernetes clusters for which Automatic node upgrades is disabled
- Click on EDIT button and Set Automatic node upgrades to Enabled
Using Command Line
To enable Automatic node upgrades for an existing cluster's node pool, run the following command:
gcloud container node-pools update \[NODE_POOL\] --cluster \[CLUSTER_NAME\] --zone \[COMPUTE_ZONE\] --enable-autoupgrade
Impact
Enabling auto-upgrades does not cause your nodes to upgrade immediately. Automatic upgrades occur at regular intervals at the discretion of the Kubernetes Engine team.
Default Value
By default, subsequent node pools do not have auto-upgrades enabled.
References
- https://cloud.google.com/kubernetes-engine/docs/concepts/node-auto-upgrades
Notes
Node auto-upgrades is not available for Alpha Clusters or clusters running the Ubuntu node image.
Service-wide remediation
Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.
Google Cloud
Use organization or folder policies where available, shared project templates, logs and alerting baselines, and IaC modules so new resources inherit the secure setting.
Operational rollout
- Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
- Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
- Re-scan and track approved exceptions with an owner and expiry date.
Query logic
These are the stored checks tied to this control.
Automatic node upgrades is enabled on Kubernetes Engine Clusters nodes
Connectors
Covered asset types
Expected check: eq []
gkeClusters(where:{nodePools_SOME:{managementAutoUpgrade_NOT:true}}){...AssetFragment}
Google Cloud