Set up OpsAI (Kubernetes)
OpsAI for Kubernetes watches your clusters through the Middleware agent and streams of metrics, logs and traces. When an issue starts, it correlates signals across pods, nodes, deployments and recent changes, then runs root cause analysis to explain what happened and where.
Auto RCA analyses metrics, logs and traces to pinpoint the root cause and proposes a clear remediation you can review. Auto Fix goes further by executing the approved change on the Kubernetes object when Full Access is enabled. Together, they shorten the time to recovery and keep workloads stable during spikes.
Prerequisite
The Kubernetes agent is installed with opsai.enabled=true, and the cluster is visible in Middleware.
Step-by-step
- Open OpsAI Settings
Go to Settings → OpsAI Settings. This is the control panel for what OpsAI can monitor, investigate and fix.

- Choose the cluster
Open Cluster Selection and tick the clusters you want OpsAI to monitor and fix. You can select one or many. Only clusters where the agent is installed appear in this list.

- Pick the write-access mode
In Execute Write Tools Command, choose how OpsAI is allowed to act when a fix is available:- Always Ask (Partial Access): OpsAI proposes a change and waits for you to run it. Use this when you want to review before any writing happens.
- Run Automatically (Full Access): OpsAI can execute approved write tools on your behalf. This enables Auto Fix to apply safe changes without a manual step.

- Enable features
Auto RCA: OpsAI continuously scans signals from your services and cluster, finds the probable root cause, and then proposes a clear fix plan. You stay in control and can decide whether to apply it.
Auto Fix: Builds on Auto RCA. When enabled and Full Access is selected, OpsAI not only proposes the plan but also applies the fix to the Kubernetes object automatically. If Partial Access is selected, the Auto Fix toggle will be unavailable.
- Confirm changes
After you add a cluster or change access mode, a toast confirms the update and states "Your changes have been saved. Updates will appear within 5 minutes."

- Enable notifications
With OpsAI, you get to choose from multiple platforms to send notifications regarding how OpsAI detects or fixes an issue automatically. Apart from multiple options, you also get to choose the frequency of notification, defining how frequently you want to get notified. According to the selected time frame (e.g, 15 minutes), it will summarize all the issues in that time frame and send you a summarized email with details.

Tips and troubleshooting
Auto Fix is greyed out: Switch Execute Write Tools Command to Run Automatically (Full Access).
Cluster not listed: Verify the agent is installed with
opsai.enabled=trueand the cluster name matches what you expect.Nothing shows in OpsAI: Check that at least one cluster is selected in Cluster Selection.
Need assistance or want to learn more about Middleware? Contact our support team at [email protected] or join our Slack channel.