Run a remediation plan
Remediation turns AI-proposed fixes into executed actions, gated on your approval. See the concept for the model.
1. Enable remediation
spec:
ai:
enabled: true
credentialsSecret: mirops-ai
remediation:
enabled: true
maxRiskLevel: low # ceiling on proposed actions
autoApprove: false # keep manual approval
When the analysis runs, the operator creates a RemediationPlan in pending-approval.
2. Review the proposed actions
kubectl get remediationplans
kubectl describe remediationplan <name>
Each action has a type, namespace/name, a reason, a risk, and a skip flag:
spec:
upgradeAnalysisRef: to-1-34
approved: false
actions:
- id: action-1
type: restart-pod
namespace: default
name: crash-test-...
reason: "CrashLoopBackOff; a restart may clear a transient failure"
risk: low
skip: false
3. Approve (or skip individual actions)
# approve the whole plan
kubectl patch remediationplan <name> --type=merge -p '{"spec":{"approved":true}}'
# ...or skip action-2, then approve
kubectl patch remediationplan <name> --type=json \
-p '[{"op":"replace","path":"/spec/actions/1/skip","value":true}]'
You can also review and approve from the Web UI's Remediation plans view.
4. Watch it run
kubectl get remediationplan <name> -o jsonpath='{.status.phase}{"\n"}'
The phase moves pending-approval → running → completed | failed, and each action records a result (success / failed / skipped) on status.results.
Two gates, recap
| Gate | Controls |
|---|---|
maxRiskLevel | which actions enter the plan (low / medium / high) |
approved | whether the plan runs (default false) |
autoApprove | skips approval entirely — use with care |
Scope
Actions are pod- and node-level (restart-pod, delete-pod, scale-deployment, cordon-node). Structural fixes — upgrading an add-on, editing a PDB, restoring a volume — stay in your hands; the analysis tells you exactly what to change.