run_os_patches
Start the rolling OS security patch of an Ankra-provisioned cluster: one host at a time, never two. Each node is checked first (nothing pending means nothing is touched), then cordoned and drained through a peer control plane with PodDisruptionBudgets honoured and never forced, upgraded with apt (the held-back systemd, udev, netplan, container-runtime and packet-filter packages included; packages are never removed and Kubernetes packages are never moved), rebooted only when the update asks for it, and returned to service only once it is Ready, its etcd member is healthy (control planes, which go one at a time and only with quorum to spare), its workloads are back and the cluster's agent has checked in. A failed drain or host stops the whole run. Nodes carrying single-replica workloads with volumes, or in a database node pool, are skipped and reported unless include_stateful_nodes is true; a cluster's only control plane is never patched live. When the cluster's OS patch policy is enabled, each host the run patches or finds up to date gets Ankra's update hold (apply_node_os_policy), and a skipped stateful node or only control plane has it removed, so every host is patched by either this lane or unattended-upgrades. The bastion goes last; on clusters where it is the NAT gateway its reboot briefly cuts the nodes' internet egress, and its NAT and SSH guard are re-asserted afterwards. The run starts only inside the cluster's maintenance window unless outside_window is true. Run plan_os_patches first to see what will happen, and follow the run with get_os_patch_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | No | UUID of the cluster. Optional when a cluster is selected. | |
| cluster_name | No | Exact name of the cluster. Optional when a cluster is selected. | |
| outside_window | No | Start now even though the cluster's maintenance window is closed. Only when the user explicitly wants that. | |
| include_bastion | No | Patch the bastion as the last step. Defaults to true. | |
| include_stateful_nodes | No | Also drain and patch nodes carrying single-replica workloads with volumes or belonging to a database node pool. Defaults to the cluster policy (off). Only when the user accepts that those workloads go down while their node is patched. |