Agentic DevOps — Hands-On Learning Path

Governed AI agent access to real infrastructure

No Simulator — Real Cluster, Real Proof

Connect Claude Code to a real Kubernetes cluster through a read-only MCP server, lock it down with least-privilege RBAC, and put it to work diagnosing a live incident — all while proving, step by step, that the agent can investigate but never mutate your infrastructure.

4 lessons
2 modules
130 min total
34 steps

Before You Start

  • Comfortable with kubectl basics (see the DevOpsPath Kubernetes track)
  • Claude Code installed and working in your terminal
  • A local sandbox cluster: kind or minikube (throwaway, free, no cloud account needed)
  • Node.js 18+ and npm installed

Run AI Agents on Real Infrastructure — Safely

AI coding agents can now read cluster state, tail logs, and diagnose failures on real infrastructure — not just write code. That raises one question every DevOps team has to answer: what exactly can the agent do, and how do you prove it can't do more?

This track answers it hands-on, starting with Kubernetes:

Build a governed interface

The Model Context Protocol (MCP) gives your agent a fixed set of tools — if a "delete pod" tool doesn't exist on the server, no prompt can invoke it.

Back it with real RBAC

A namespace-scoped, least-privilege ServiceAccount means the agent's credential is denied at the Kubernetes API level too — defense in depth, not just a policy.

Prove it, don't just claim it

Every lesson ends the same way: attempt a write with the agent's real credential and watch it get a 403 Forbidden.

By the end, you'll have a pattern for governed agent access you can extend to every system your agents touch.

2 modules0 open

1

Connect Claude Code to Kubernetes Safely with MCP + RBAC

Build a read-only Kubernetes MCP server, connect Claude Code to it, and prove the agent can investigate your cluster but cannot change it — no mutating tool exists, and the same credential is denied on a direct write.

Intermediate40 minutes10 steps
Required
Comfortable with kubectl basics (see the DevOpsPath Kubernetes track)Claude Code installed and working in your terminalA local sandbox cluster: kind or minikubeNode.js 18+ and npm installed
2

Kubernetes MCP Security: RBAC, ServiceAccounts, and Least Privilege

Go deep on the identity behind a read-only Kubernetes MCP server. Prove least privilege across two independent dimensions — WHAT the agent may do (verbs and subresources) and WHERE it may do it (namespace scope) — close the exec/attach/port-forward escalation paths, and harden the ServiceAccount token and kubeconfig you built in Lesson 1.

Intermediate40 minutes9 steps
Required
Lesson 1 complete: the read-only MCP lab is in place (demo namespace, mcp-readonly ServiceAccount/Role/RoleBinding, web Deployment, crasher pod)Comfortable with kubectl basics (see the DevOpsPath Kubernetes track)A local sandbox cluster still running: kind or minikube
3

Troubleshoot Kubernetes with Claude Code + MCP

Put the read-only MCP lab to work. Diagnose the crashing pod from Lesson 1 entirely through Claude Code — reading pods, events, and logs — separate the CrashLoopBackOff symptom from its real root cause, and prove the agent can fully explain the failure while being unable to change anything. Then fix it yourself and confirm the repair through the agent, read-only.

Intermediate35 minutes9 steps
Required
Lesson 1 complete: the read-only MCP lab is in place (demo namespace, mcp-readonly ServiceAccount, web Deployment, crasher pod) and the k8s-readonly MCP server is registered with Claude CodeLesson 2 recommended: you understand why the agent's identity is read-only and namespace-scopedA local sandbox cluster still running: kind or minikubeClaude Code working in your terminal