Skip to content
Serkan Köse
Accent

AI-assisted DevOps: use cases, potential, and risks

A typical incident rarely starts with a clear failure mode. An alert fires, a dashboard looks suspicious, a Pod restarts, a Flux Kustomization gets stuck, somewhere in the logs there is a stack trace. Then the real work begins: collecting context.

You jump between kubectl, Grafana, Loki, Prometheus, Git, CI, and GitOps status. Only once enough signals are on the table does a reliable hypothesis emerge. This is exactly where AI-assisted DevOps becomes interesting.

Not because AI should solve the incident autonomously. But because it can shorten the time between a question and a useful signal.

For me, the leverage is not "AI writes code". The leverage is shorter feedback loops:

  1. What is broken right now?
  2. Which signals support which hypothesis?
  3. Which change would be small enough to check safely?
  4. What does the real environment say?
  5. How does control stay with humans, reviews, and the GitOps process?

That is the thread running through this post: AI is useful in a DevOps context when it makes context easier to access, helps prepare changes, and brings validation closer to real infrastructure. It is not a replacement for system understanding and not a free pass for write access to every environment.

The real leverage: shorter feedback loops

DevOps work consists largely of feedback loops. You change a manifest, render a chart, wait for a controller, inspect Events, read logs, look at metrics, adjust RBAC, and check again. Many of these steps are not hard, but they cost time and attention.

AI can compress these steps. It can explain a diff, classify an error message, formulate PromQL or LogQL, compare Kubernetes objects, summarize suspicious Events, or suggest a small change.

The decisive question is the surface it works against. A chat window without context quickly becomes generic. It becomes interesting when the model can access the same working surface I use: repository, local development environment, cluster state, logs, metrics, traces, GitOps status, and documentation.

Then an abstract assistant becomes a tool inside the operational loop. It does not decide on its own. It helps make the next useful check visible faster.

Incident analysis: getting to a useful signal faster

In troubleshooting, the first pass is often the most expensive one. Is it a rollout problem? A broken Secret? A missing RBAC rule? An image pull error? A downstream dependency? A network problem? A wrong Kustomize substitution?

MCP is a game changer here because it can give AI structured access to tools that are otherwise spread out. A Kubernetes MCP can read objects, Events, and Conditions. A Prometheus or Grafana MCP can query metrics. Loki or OpenTelemetry-adjacent tools can bring in logs and traces. Flux or ArgoCD context can show whether the desired state was reconciled successfully at all.

The workflow becomes more concrete:

  • Which Pods are affected?
  • Which Events happened since the rollout?
  • Which Kustomization or Application is not ready?
  • Which HelmRelease condition failed?
  • Which logs match the request ID or the alert window?
  • Which metric changed before the failure?

This does not replace experience. A wrong hypothesis stays wrong, even if it was formulated quickly. But the first search space gets smaller. Instead of manually clicking context together from five surfaces, AI can collect the state in a structured way and propose questions you would otherwise have asked one by one.

The boundary matters: incident analysis is read-only first. Especially in production, AI should not automatically remediate, delete resources, or roll back deployments. In a good setup, it collects context, formulates hypotheses, and suggests next checks or pull requests. The decision and responsibility stay with humans and the established process.

Production-like prototypes: letting AI work against real infrastructure

The second area where I see strong value is local development against real infrastructure. Especially as a system engineer, platform engineer, or DevOps person, you often have a good feel for which platform idea could work, but not always the classic full-stack background to quickly build a complete application around it.

AI shifts that boundary. It can help with the backend, UI components, operator code, tests, or glue code. But it becomes really powerful only when the application does not just run locally against mocks, but is validated early against real Kubernetes objects.

A local KinD cluster with the same CRDs, RBAC rules, Helm charts, and ingress paths as production is a good working surface for that. The code does not hit a simulation, but the Kubernetes API. An operator reconciles real Custom Resources. Status patches, OwnerReferences, Events, and RBAC problems actually exist.

This is the exact approach I use in kubeplate: a monorepo with operator, API, web UI, database, Helm chart, CI, and a local development loop through KinD and DevSpace. devspace dev syncs files into the Pods, web, server, and operator hot-reload, and a change is active in the cluster seconds later.

For devhub, the same principle is even more interesting. The project is an experimental self-service portal for Kubernetes. The idea cannot be evaluated meaningfully with mock data only, because the core of the application is Kubernetes interaction: environments, services, databases, workspaces, cluster status, wrapped behind API and operator.

AI helps here with more than writing code. It helps build vertical slices faster: UI, API, Kubernetes client, CRD, reconcile logic, Helm chart, and local validation. As a DevOps-oriented person, that lets me build full-stack prototypes without losing the infrastructure perspective.

The important part is production-likeness. If validation only happens in an isolated mock world, AI quickly produces nice-looking code without operational value. But if the loop runs against real CRDs, real RBAC rules, and real routing, nonsense shows up earlier.

GitOps and reviews: assistance instead of autopilot

GitOps remains the frame that makes AI-assisted DevOps controllable for me. The desired state lives in the repository. Changes go through diffs, CI, review, and reconciliation. AI can help, but it does not replace this frame.

Flux or ArgoCD create many useful assistance points:

  • Why is a Kustomization or Application not ready?
  • Which resource causes the error?
  • Which values does the Helm chart actually render?
  • Which change in the PR affects which Namespaces, Roles, or Deployments?
  • Is there drift between Git and the cluster?
  • Is the order of CRDs, controller, and Custom Resources correct?

AI is especially useful in GitOps because many errors come from the interaction of several layers. A YAML snippet is rarely the whole problem. What matters is what Kustomize makes of it, what Helm renders, what the controller accepts, and what the actual current state in the cluster looks like in the end.

AI can also be a useful second perspective in code reviews. Not as a replacement for human review, but as an additional check:

  • Which Kubernetes resources change?
  • Are new RBAC permissions granted?
  • Do SecurityContexts, ingress rules, or NetworkPolicies change?
  • Are there risky defaults?
  • Are tests or validation missing for the new path?
  • Is the rollout reversible?

That fits well into a PR-based workflow. AI can read a diff, flag risks, formulate questions, and suggest test ideas. It still gets merged only once a human understands the change.

Risks: not every environment is a good AI working surface

AI-assisted DevOps only makes sense when the environment is intentionally bounded. A model with broad write access to production is not a modern workflow; it is an unnecessarily large blast radius.

For me, a few guardrails follow from that:

  • Read-only first. Analysis, context collection, and explanation are much less risky than direct changes.
  • Keep write access tightly scoped. If tools are allowed to write, then only to clearly defined resources, Namespaces, or local environments.
  • Production is special. It needs approvals, runbooks, reviews, and clear responsibilities between AI and change.
  • No secrets in prompts. Tokens, kubeconfigs, customer data, and internal logs need explicit boundaries.
  • Git stays the control layer. Persistent changes should be visible as a commit or pull request.
  • Small changes beat large automatic fixes. The smaller the diff, the easier review and rollback become.
  • AI can be wrong. Every answer is a hypothesis, not proof.

Automatic remediation is especially critical. A rollout restart, a scale-down, a Secret update, or a delete can cause real damage if the root cause was misunderstood. Those actions need more than a plausible model argument.

That does not mean AI has no place in operational environments. It only means the role has to be clear. It can collect context, explain relationships, formulate queries, review diffs, and prepare suggestions. The closer it gets to production changes, the stronger review, approval, and auditability need to be.

Conclusion

AI-assisted DevOps is not autopilot for me. It is a way to shorten expensive feedback loops.

During incidents, AI helps move faster from scattered signals to a reliable hypothesis. In local Kubernetes setups, it helps validate ideas against real infrastructure. In GitOps and reviews, it helps understand diffs, controller state, and rollout risks faster.

The biggest personal effect is that the boundary between DevOps, platform engineering, and classic development becomes more permeable. With enough infrastructure understanding and the right guardrails, a system- or platform-oriented person can now build complete prototypes: UI, API, operator, Helm chart, CI, and GitOps path.

Control should not move to AI in that process. It stays with Git, reviews, tests, clear permissions, and the people who need to understand the impact of a change.