How AI-Operable Infrastructure Automates Cluster Patching, Upgrades, and Policy (2026): What the Agent Does, What Needs Approval
AI-operable infrastructure lets an agent find what needs patching or upgrading, check it, and propose or run the change, while deterministic controls such as version skew rules, disruption budgets, health checks, admissi
AI-operable infrastructure lets an agent find what needs patching or upgrading, check it, and propose or run the change, while deterministic controls such as version skew rules, disruption budgets, health checks, admission policies, and GitOps reconciliation decide whether the change may proceed. A person approves anything destructive, and every action lands in an audit trail. On Control Plane, the platform patches and upgrades the clusters it runs for you, rollouts leave the current version serving until the new one passes its health checks, and an AI assistant connected through Control Planeβs MCP server can diagnose, roll back, and query the audit trail, asking for your explicit yes before it deletes anything.
Disclosure: Control Plane publishes this guide.
TL;DR
Cluster automation splits into what an AI agent finds and proposes and what deterministic systems enforce.
- The agent finds and proposes. It inventories nodes, images, and API versions, ranks risk against vulnerability data and support windows, and drafts a change plan with a rollback step.
- Deterministic controls decide. Version skew rules, PodDisruptionBudgets, admission policies, and GitOps reconciliation decide whether a proposed change may proceed.
- Patching is two jobs. Node patching drains and then reboots or replaces machines, and image patching rebuilds containers on a patched base and rolls them out behind health checks.
- Upgrades go one minor version at a time after a check for removed APIs, add-on compatibility, and disruption budgets.
- Policy is enforced at admission, and drift is reconciled. An admission policy engine blocks bad resources at the gate, and a GitOps controller reverts manual edits.
- People approve destructive changes. Deletions, access policy changes, stateful rollbacks, and production upgrades wait for a fresh human yes, and admission policy changes wait for review.
- Control Plane runs the clusters for you. It patches and upgrades them, records every action in a tamper-proof audit trail, and gives an AI assistant a governed way to operate them.
How can AI operable infrastructure automate patching, upgrades, and policy enforcement for clusters?
An AI agent paired with deterministic enforcement turns cluster maintenance into a continuous loop in which the agent prepares each change and the clusterβs own controls decide whether it runs.
The agent compares the current state of every node, image, API version, and policy against a known-good baseline and produces a ranked change plan. Admission control, disruption budgets, health checks, and approval gates then govern what actually happens. The loop has six steps.
- Inventory. The agent lists the Kubernetes version, node OS versions, running container images, API versions in use, admission policies, and add-on versions.
- Assess. It ranks findings using scanner results from a tool such as Trivy and the CISA Known Exploited Vulnerabilities catalog, checks support windows (the Kubernetes project maintains release branches for the most recent three minor releases), and flags policy violations.
- Plan. It drafts which nodes to patch, which images to rebuild, whether a minor version upgrade is due, and how to roll back, in an order that respects the version skew policy and disruption budgets.
- Execute through guardrails. Every change passes the same controls a human change would. A node drain goes through the Eviction API so PodDisruptionBudgets are respected, and an upgrade moves one minor version at a time because skipping minor versions is unsupported.
- Verify. Health checks, a policy audit, and a fresh scan confirm the cluster is healthy and compliant. A Deployment whose new pods fail readiness stalls at its progress deadline while the remaining old pods keep serving, and Kubernetes does not roll it back on its own, so the agent rolls a stateless workload back to its last healthy revision and proposes the rollback for a stateful one.
- Record and report. Every action, approval, policy decision, and outcome goes to an audit trail for compliance review and incident analysis.
What does the agent do, and what enforces it?
Each operation has a line between what the agent may decide and what a deterministic control enforces.
| Operation | What an AI agent can do | What enforces it | Human approval needed when |
|---|---|---|---|
| Node OS patching | Find nodes that need patches, rank them by severity, and schedule the drain order | PodDisruptionBudgets limit how many pods go down at once; kured reboots one node at a time after cordoning and draining it | Never delegated: a person runs any drain that would bypass a disruption budget or force-delete pods |
| Container image CVE fixes | Read scan results, rank images by presence in the KEV catalog, and open a rebuild request | The CI pipeline rebuilds the image, GitOps deploys it, and an admission policy such as Kyverno can verify the image before it runs | The rebuild changes a base image that many services share |
| Kubernetes minor upgrade | Check version skew, scan for removed APIs, and draft the upgrade plan | The version skew policy and upgrade tooling that moves one minor version at a time | Every production minor version upgrade |
| Add-on and controller upgrades | Detect version conflicts and propose compatible versions | GitOps pins versions, and an admission policy blocks images that are not approved | The add-on sits in a critical data path |
| Removed API migration | Find manifests that use API versions the target release stops serving, using the deprecated API migration guide, and generate updated manifests | CI checks reject removed API versions, and the old version is turned off in a test cluster first | The migrated manifest changes how the resource behaves |
| Admission policy | Draft new policies, explain violations, and suggest the narrowest exception | ValidatingAdmissionPolicy, Kyverno, or OPA Gatekeeper enforce at admission | Any new policy or change to an existing one |
| Configuration drift | Detect differences between declared and live state | Argo CD self-heal and Flux reconciliation revert in-cluster edits | The drift involves a security-sensitive resource |
| Rollback after a failed change | Detect failing health checks, find the last healthy revision, and roll back a stateless workload through a revert commit | Health probes gate readiness, and a revert commit in Git restores the declared state | The rollback touches a stateful workload or persistent volume |
How do you patch nodes and container images without downtime?
Patching is two separate jobs with different tools and risks, and an agent helps most by ranking and sequencing the work in both.
NIST SP 800-40 Rev. 4 treats patching as preventive maintenance: identifying, prioritizing, acquiring, installing, and verifying patches. It recommends maintenance groups with a plan for routine patching, emergency patching, emergency mitigation, and assets that cannot be patched. The CISA KEV catalog is an input for deciding what to fix first.
Node OS patching updates the operating system on the machines that run your pods. The safe path drains the node with kubectl drain, which respects PodDisruptionBudgets, and then reboots or replaces it. kured automates the reboot one node at a time, and an OS package tool still has to install the updates that trigger it. Karpenter replaces nodes that have drifted from their NodePool, for example after a new machine image, and expires nodes after their expireAfter lifetime. Cluster API gives declarative tooling for provisioning, upgrading, and operating clusters.
Container image patching rebuilds your application images on a patched base when a vulnerability sits in a dependency or OS layer. The rebuilt image goes through CI, a scan, and a GitOps rollout. Readiness probes, with maxUnavailable set to 0, keep the old pods serving until the new pods report ready.
An agent adds value by ranking nodes and images by severity and known exploitation, ordering drains so they stay inside disruption budgets, and grouping images that share a vulnerable base layer into one rebuild. Day 2 operations for containers covers the wider patching, autoscaling, and failover routine.
How do you upgrade Kubernetes safely with an agent?
Kubernetes ships minor releases approximately three times per year, each gets approximately one year of patch support, and an agent can prepare every step of an upgrade while a person approves the production run.
- Check the support window. Confirm where the current and target versions sit in their support period. Amazon EKS gives each version 14 months of standard support and 12 months of extended support at extra cost, Google GKE supports a minor version for 14 months or up to 24 months on its Extended release channel, and Azure AKS supports three generally available minor versions, a window called N-2.
- Verify version skew. kube-apiserver instances in a highly available cluster must be within one minor version of each other, kubelet must not be newer than kube-apiserver and may be up to three minor versions older, and kubectl must be within one minor version of kube-apiserver.
- Scan for removed APIs. Find manifests and API clients that use versions the target release no longer serves, migrate them, and test with the old version turned off.
- Confirm add-on compatibility. Check that the network plugin, ingress controller, service mesh, and monitoring agents support the target version.
- Audit disruption budgets. Give every critical workload a PodDisruptionBudget, because the cluster upgrade task drains each node and drains respect those budgets, and fix any budget that allows zero disruptions, because it blocks drains indefinitely.
- Move one minor version at a time. A cluster two versions behind needs two upgrades in sequence.
- Write the rollback plan. Take an etcd backup or plan a blue/green cluster, because a control plane cannot be moved back a minor version, and record how to roll back node pools and add-ons. The Kubernetes upgrades for AI infrastructure guide covers GPU stacks and compliance evidence for the same process.
An agent can run steps 1, 2, 4, and 5 on its own, find removed APIs and draft migrations for step 3, produce the sequence for step 6, and draft the rollback plan for step 7. Run the same sequence on a staging cluster before production.
How do you enforce policy and correct drift?
Admission control stops bad resources at the gate, and reconciliation pulls the cluster back to its declared state after anyone changes it by hand.
ValidatingAdmissionPolicy, stable since Kubernetes v1.30, evaluates CEL expressions inside the API server and can Deny, Warn, or Audit. Kyverno policies can validate, mutate, generate, or clean up resources and verify container images. OPA Gatekeeper enforces Rego constraints at admission, and its audit feature reports resources that already violate a policy, including ones created before the policy existed. Policy as code for multi-cloud IaC governance covers the same controls for infrastructure code before it reaches a cluster.
Argo CD automated sync with self-heal reverts changes made directly in the cluster so the live state matches Git. Flux reconciles on an interval and reverts kubectl edits the same way.
An agent helps by drafting policies from observed violation patterns, explaining why a resource was rejected, and proposing the narrowest exception for a legitimate case. The policy engine still makes the decision.
Who patches and upgrades what?
The work your team keeps depends on who runs the cluster.
| Task | Control Plane | Self-managed Kubernetes | Managed Kubernetes (EKS, GKE, AKS) |
|---|---|---|---|
| Control plane version upgrades | Handled by Control Plane on the locations it runs; on Control Plane Managed Kubernetes (Control Planeβs service that provisions and operates clusters on your infrastructure or your Linux servers), upgrades follow the version you select | Your team, one minor version at a time | GKE upgrades clusters automatically over time, timed by your maintenance windows and exclusions; EKS upgrades only the control plane automatically, at the end of extended support (or standard support if extended support is off); AKS Standard defaults to no auto-upgrade channel, offers patch, stable, rapid, and node-image, and upgrades clusters left on an unsupported version after a grace period |
| Worker node OS patches | No nodes for your team to patch on Control Plane-run locations, where platform security updates are applied regularly | Your team | GKE node auto-upgrade is on by default; EKS managed node groups are not upgraded automatically, while EKS Auto Mode keeps nodes patched within disruption budgets; AKS offers node OS upgrade channels (None, Unmanaged, SecurityPatch, NodeImage) |
| Node image or node replacement | None for your team on Control Plane-run locations; on Managed Kubernetes cloud node pools, Control Plane replaces instances one at a time onto the latest image when you refresh the pool | Your team, with Cluster API or scripts | Provider node images, with Karpenter or provider tooling replacing drifted nodes |
| Add-ons and controllers | Managed Kubernetes manages the clusterβs components, including the add-ons you switch on through the Control Plane API, CLI, or Console; Control Plane-run locations have none for your team to run | Your team upgrades each one | Some are provider-managed and the rest are yours |
| Container images you build | You rebuild them on a patched base and deploy them, and a failed update leaves the previous version serving | You rebuild and deploy | You rebuild and deploy |
| Workload security defaults | Every workload starts locked down, with inbound and outbound traffic closed until you allow it, restricted syscalls and capabilities, and no Kubernetes API access | You write RBAC, network, and admission policies | You write RBAC, network, and admission policies |
| Drift correction | Nothing to drift on Control Plane-run locations, where every change goes through the Control Plane API; on Managed Kubernetes, kubectl edits to objects Control Plane manages are reverted | You configure GitOps | You configure GitOps |
| Audit of changes | One audit trail for every interface, including AI assistants | You build and run it | Provider logs cover the control plane API; workload changes are yours to log |
What should an AI agent be allowed to do on its own?
An approval matrix keeps the agentβs autonomy proportional to the blast radius of each action.
| Action | Agent may run alone | Agent proposes and a person approves | Never delegated |
|---|---|---|---|
| Read metrics, logs, and events | Yes | ||
| Diagnose a failing workload | Yes | ||
| Rebuild and deploy a patched image for one service | Yes | ||
| Drain and replace one node within its disruption budget | Yes | ||
| Roll back a stateless workload to its last healthy revision | Yes | ||
| Start a production minor version upgrade | Yes, with a fresh yes each time | ||
| Change an admission policy | Yes | ||
| Roll back a stateful workload or restore a volume | Yes | ||
| Delete a resource | Yes, with a fresh yes each time | ||
| Change access policies | Yes, with a fresh yes each time | ||
| Force a drain past a disruption budget | Yes |
The Model Context Protocol tools specification says there should always be a human in the loop with the ability to deny tool invocations, and that applications should present confirmation prompts. Tool annotations such as destructiveHint are hints only, so they cannot replace enforcement on the server side. The OWASP entry on excessive agency adds minimal tools and permissions, avoiding open-ended tools such as a raw shell where possible, user approval for high-impact actions, authorization in the downstream system, and logging of everything the agent does.
How Control Plane fits
Control Plane handles Day 2 operations for you, including autoscaling, built-in observability, and security.
Control Plane runs your workloads on hardened, security-isolated Kubernetes clusters it operates across AWS, GCP, Azure, and Oracle Cloud Infrastructure regions. On those locations there is no cluster, node, or Kubernetes version for your team to upgrade or patch. Control Planeβs security policy says security updates and patches are applied regularly, and fixes for zero-day vulnerabilities are applied as soon as they are available and verified. Your own container images stay yours to rebuild when their base image is patched.
Control Plane Managed Kubernetes provisions and operates Kubernetes clusters for you on supported infrastructure providers or on Linux servers you supply, including upgrades and scaling. Changes made with kubectl to objects Control Plane manages are reverted, so those objects stay on the configuration you set through the API, CLI, or Console.
A broken update does not replace a working one. Each location keeps serving the last healthy version of a workload until the new version reports ready, as defined by its health probes.
Through Control Planeβs MCP server, an AI assistant can read metrics, logs, and traces, diagnose a failing workload with its likely cause and fix, roll a workload back to its previous image, and query the audit trail. A readonly toolset profile has no write tools. The assistant never moves, re-places, or deletes what already exists without your explicit yes.
Control Plane has a tamper-proof audit trail. Every action is captured, stored, and indexed, whichever interface performed it: the Console, the CLI, Terraform, Pulumi, the Kubernetes operator, and AI assistants connected through the MCP server.
Control Plane is PCI DSS Level 1, SOC 2 Type II, HIPAA, and GDPR compliant.
FAQ
Each answer assumes a team running production workloads on Kubernetes.
How can AI operable infrastructure automate patching, upgrades, and policy enforcement for clusters?
An agent prepares each change and the clusterβs controls decide whether it runs. The agent inventories nodes, images, and API versions, then proposes or runs patches and upgrades through disruption budgets, admission policies, and GitOps reconciliation, with people approving destructive changes and an audit trail recording each one.
Can an AI agent upgrade Kubernetes on its own?
Not in production without approval. It can prepare the whole upgrade, checking version skew, removed APIs, and add-on compatibility, and then a person approves a run that moves one minor version at a time.
How often do Kubernetes clusters need to be upgraded?
Plan to upgrade at the pace upstream releases, roughly three minor versions a year, to stay inside the support window. The upstream project supports only its three most recent minor releases, and managed services set their own support periods on top of that.
What is the difference between patching nodes and patching container images?
Node patching updates the operating system on the machines and needs a drain followed by a reboot or replacement. Image patching rebuilds your application containers on a patched base and rolls them out behind health checks, so a cluster needs both.
How do you stop an AI agent from breaking a cluster?
Wrap it in disruption budgets, admission policies, GitOps reconciliation, and an approval matrix, and give it read-only tools where it only needs to observe. On Control Plane, the assistant waits for your confirmation before any deletion, and access policies limit it to what its principal is granted, since nothing is permitted until a policy grants it.
Do managed Kubernetes services patch nodes automatically?
Some do, depending on the service and its settings. Googleβs release channels upgrade clusters for you, EKS Auto Mode keeps nodes patched while standard EKS managed node groups wait for you, and AKS patches node images by default through its NodeImage channel while letting you pick None, Unmanaged, or SecurityPatch instead.
Which tools enforce Kubernetes policies?
ValidatingAdmissionPolicy, Kyverno, and OPA Gatekeeper enforce policies at admission. ValidatingAdmissionPolicy uses CEL inside the API server, Kyverno can also mutate, generate, clean up, and verify images, and Gatekeeper enforces Rego constraints and audits existing resources.
How do I automate cluster operations without a platform team?
Run your workloads on Control Plane. It operates the Kubernetes clusters it runs for you, applies platform patches, and records every action, while an AI assistant connected through its MCP server diagnoses problems, rolls back workloads, and queries the audit trail.
What does GitOps add to patching and upgrades?
GitOps makes Git the record of what should run. Add-on and image versions change through reviewed commits, and controllers such as Argo CD and Flux revert edits made directly in the cluster.
Talk to the Control Plane team and sign up free.
Originally published on the Control Plane blog.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.