Description
For a new GKE node pool, set management.auto_upgrade: yes in the Ansible creation task. The separate auto_repair setting repairs unhealthy nodes.
Potential impact
If manual updates slip, nodes can miss patches or fall out of compatibility with the control plane. Control-plane updates continue, and GKE can upgrade nodes after their version reaches end of support.
Remediation
For an existing pool, use gcloud container node-pools update with --enable-autoupgrade. Check its upgrade setting and version in GKE and plan for workload disruption during maintenance. If you manage updates manually, test and apply them before support ends.
Examples
Supply the prepared cluster resource, the project and the path to a protected service-account JSON file.
Before
- name: create a node pool
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: serviceaccount
service_account_file: "{{ gcp_service_account_file }}"
state: present
- name: create a third node pool
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: serviceaccount
service_account_file: "{{ gcp_service_account_file }}"
state: present
management:
auto_repair: yes
auto_upgrade: no
The two tasks illustrate alternatives for the same my-pool. Check its actual setting when management is omitted. The second task explicitly enables repair and disables upgrades.
After
- name: create a node pool
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
location: us-central1-a
project: "{{ gcp_project }}"
auth_kind: serviceaccount
service_account_file: "{{ gcp_service_account_file }}"
state: present
management:
auto_upgrade: yes