Before you start
- A cluster Ankra built on Ankra Cloud, AWS, DigitalOcean, Hetzner, OVHcloud, Scaleway or UpCloud. An imported cluster is refused.
- Permissions on the cluster. Reading the status needs
clusters.read. A dry run and a run needclusters.operate: the dry run opens an SSH session to every host, and the run drains, patches and can reboot them. Changing the policy needsclusters.write. - The CLI or an API token. The examples use a Hetzner cluster; replace
hetznerin the command or the path with the cluster’s provider:ankracloud,aws,digitalocean,hetzner,ovh,scalewayorupcloud. The curl examples read the token fromANKRA_API_TOKEN.
1. Read the status
security_lag_days. A cluster nobody configured reads the default policy, marked as not stored.
Over MCP and in chat the same read is get_os_patch_status.
2. Dry-run the pending updates
plan_os_patches.
3. Run a rolling patch
ankra cluster operations list and the cluster’s Operations page.
The CLI asks before it starts (--yes skips the question). The body is optional, and every field defers to the cluster’s policy:
A node that is not up, and a cluster’s only control plane, are never patched by a run: they are skipped and reported. Sending the same request twice cannot start two runs. While one is in flight, a second is refused with
409, naming the operation already running.
The tool is run_os_patches, and Ankra’s AI asks you to confirm it before it runs.
4. Set the policy
A cluster’s policy decides whether Ankra starts runs on its own, when, how often and what it may drain. Change only the fields you send; an omitted ornull field keeps its stored value.
--disable turns the policy off, --security-lag-days sets the lag threshold, and --include-stateful-nodes or --exclude-stateful-nodes set what runs may drain.
A cluster nobody configured is not patched automatically, because patching drains and can reboot every node. Until the status shows a run Ankra started on its own, start runs by hand as in step 3. The default window has no Friday or weekend starts, so a run that goes wrong meets a working day. A person can always run a patch by hand.
A value of the wrong type is refused with
422, and a value out of bounds with 409, naming the field. The tool is set_os_patch_policy, also confirmed before it applies.
Troubleshooting
Related
- Operate Ankra-managed clusters - node groups, restarts, the bastion and upgrades.
- Change Management - operating system patching inside the patch window.
- MCP Tools