By Krust··9 min read

A Kubernetes AI Agent Needs Skills, Not a Bigger Prompt

How Krust AI uses Kubernetes agent skills, live cluster tools, UI context, local memory and approval gates to make diagnostics more reliable than chat.

aiarchitecturekubernetes

Type $ for skills or @ for resources.

A Kubernetes AI agent does not get better just because you paste more instructions into the system prompt.

During incident work, the hard part is not writing a clever paragraph that says “be a good SRE.” The hard part is getting the agent to choose the right workflow for the symptom in front of it, gather fresh evidence from the cluster, avoid stale assumptions, and stop before it mutates production.

That is why Krust treats skills as operational workflows, not personality traits. If you are new to the agent, start with Krust AI diagnostics and the earlier post on AI assistants inside a Kubernetes GUI.


What a Skill Means in Krust AI

In Krust, a skill is a local SKILL.md file with a name, description, and task-specific workflow. The agent sees a lightweight catalog of available skills, then can load the full body when a skill is selected, invoked, or needed for the task.

That distinction matters.

The agent should know which workflows are available without carrying every workflow in every answer. A node capacity question, a service DNS issue, a Prometheus metrics query, and a Critical Report analysis should not all pay the same context cost.

Krust’s skill flow is intentionally small:

  1. Discover available skills from repo, user, system, and plugin roots.
  2. Show lightweight skill metadata in the agent context.
  3. Let the user type $ in the chat box to pick a skill.
  4. Load the full SKILL.md only when needed.
  5. Use Kubernetes tools to collect live evidence before concluding.

The UI hint is plain: Type $ for skills or @ for resources.

Skills are not hidden magic. They are inspectable files.


Why Prompt-Only Kubernetes Agents Drift

A prompt-only agent usually starts with a giant instruction block:

  • how to debug pods
  • how to debug services
  • how to debug DNS
  • how to inspect resource limits
  • how to handle approvals
  • how to summarize incidents
  • how to avoid dangerous actions

That looks comprehensive, but it creates three problems.

First, the model has too much generic guidance and too little task-specific pressure. When a pod is Pending, it should inspect scheduling events, taints, tolerations, PVC binding, quota, and node pressure. When a pod is CrashLoopBackOff, it should inspect previous logs, exit code, config references, probes, and recent rollout changes. Those are different workflows.

Second, the prompt becomes stale. Kubernetes operations change by cluster, team, provider, and convention. A workflow that is useful for a single-node home lab may be wrong for a production cluster with admission controllers, quota, custom controllers, and spot/on-demand node pools.

Third, the agent can sound confident before it has evidence. In Kubernetes, that is dangerous. A plausible answer is not the same as a diagnosis.

Krust skills are written to push the agent back toward evidence.

For example, a pod triage workflow should start by identifying the failing layer: scheduling, image pull, init container, runtime crash, OOM, probe/readiness, node pressure, config/secret, or unknown. A capacity review workflow should compare requests, limits, usage metrics, throttling, node pressure, quota, and autoscaler settings before suggesting changes.

That is the difference between “AI advice” and an actual diagnostic workflow.


Skills Work Best When the Agent Has Tools

A Kubernetes AI agent without tools is just a chat window with better autocomplete.

Krust’s agent can call native Kubernetes tools from inside the app. Read-only tools can inspect resources, list objects, fetch logs, grep YAML, get events, explain API schema, query metrics, and recall local memory. Write tools such as delete, scale, restart, apply, and patch are separated behind explicit approval.

This lets skills say things like:

  • inspect the selected workload before reading logs
  • prefer controller-level evidence when many replicas fail
  • compare resource requests against actual usage before recommending capacity changes
  • use events around the incident window
  • do not conclude from a report alone

The skill does not need to embed cluster data in the prompt. It tells the agent what evidence to collect.

That is a better boundary. The model handles reasoning. Krust handles the cluster connection, tool registry, UI context, and safety checks.


The UI Context Is Part of the Agent

Most Kubernetes AI tools start from an empty text box. That forces the user to describe what is already visible on screen.

Krust does not need that detour.

If you are looking at a pod, the agent can receive that pod as context. If you mention a resource with @, the agent can anchor the conversation to the exact object. If you type $, the agent can show available skills such as Critical Report analysis or Prometheus metrics workflows. The chat box becomes a control surface for the same resource model the rest of the app uses.

“AI Kubernetes dashboard” should not mean “a dashboard with a chatbot attached.” The useful version is a dashboard where the agent can see the selected resource, open or filter the relevant resource view, inspect live state, and explain findings in place.

The workflow is:

visible Kubernetes resource
        |
        v
selected context / @ mention
        |
        v
skill workflow / $ mention
        |
        v
read-only tools collect evidence
        |
        v
answer, chart, or proposed action
        |
        v
approval gate before mutation

That is a product architecture choice, not a prompt trick.


Example: Pod Triage Without Guessing

Suppose a user asks:

@checkout-api why is this not ready?

A weak agent might immediately say:

The readiness probe is probably failing. Check the probe path and service port.

That may be true. It may also be wrong.

The Krust workflow should first classify the failure mode. Is the pod pending? Is an init container failing? Is the main container running but not ready? Is the pod restarting? Are all replicas affected or only one? Did the latest rollout change the image, command, env, probes, or resources?

Only then should it explain the likely cause.

A stronger answer looks like:

Failing layer: readiness probe

Evidence:
- Pod checkout-api-7f8d9c is Running but Ready=False
- Container is not restarting, so this is not a crash loop
- Events show repeated readiness probe failures on GET /healthz
- Container exposes port 8080, but the readiness probe targets port 8081

Likely cause:
The readiness probe is pointed at the wrong port.

Safest next action:
Review the deployment probe port before patching. If confirmed, update
spec.template.spec.containers[0].readinessProbe.httpGet.port to 8080.

The value is not that the model knows Kubernetes. The value is that the agent followed a workflow and cited observed evidence.


Example: Capacity Review Needs More Than Percent CPU

Capacity questions are another place where generic AI advice is risky.

If a user asks whether a namespace is over-requested, the agent should not look at one pod and recommend cutting CPU requests by 50%. It should compare requests, limits, usage, quota, HPA behavior, node pressure, throttling, restarts, OOM events, and workload criticality.

That is why capacity review should be handled as a workflow, not a one-line prompt.

Good capacity output should be boring and specific:

Finding Evidence Risk Suggested change
CPU request may be high checkout-api requests 2 cores, p95 usage is 350m over 24h Medium Reduce only after checking latency and traffic peak windows
Memory limit is tight worker pods use 470Mi against 512Mi limit and had 3 OOMKilled events High Raise limit or profile startup memory before rollout
Namespace quota blocks rollout deployment wants 6 replicas but quota admits 4 High Increase quota or lower requests with rollback plan

The workflow’s job is to prevent blanket advice. Capacity changes affect scheduling, autoscaling, reliability, and cost. A Kubernetes AI agent should treat them as evidence problems, not arithmetic problems.


Skills Should Be Local and Inspectable

Krust loads skills from local roots:

  • repo skills for project-specific workflows
  • user skills for personal runbooks
  • system skills bundled with Krust
  • plugin skills for domain packs such as Kubernetes troubleshooting or observability

This keeps the workflow understandable. A team can read the actual instructions the agent will follow. They can add a runbook for their platform conventions. They can disable plugin skills they do not want. They do not have to trust a remote prompt registry.

For production Kubernetes work, inspectability is not cosmetic.

If an agent recommends a patch, a restart, a scale-up, or a drain, operators need to know what policy guided that recommendation. Local skills make that easier to audit than a black-box hosted assistant.


Memory Is Separate From Skills

Skills are workflows. Memory is history.

Krust keeps those concepts separate.

A pod triage workflow can say “classify the failure mode and inspect events before logs.” Memory can say “this service had the same OOM pattern last month and the confirmed fix was raising the startup memory limit.”

The agent should use fresh live data first for current cluster state. It should use memory when the user references prior incidents, runbooks, recurring symptoms, known fixes, or ambiguous service names.

This separation prevents a common failure mode: using stale memory as if it were current evidence.

The right order during incident work is:

  1. Inspect current state.
  2. Recall relevant prior incidents when useful.
  3. Compare history against live evidence.
  4. Explain what is observed now.
  5. Store memory only after the root cause or fix is confirmed.

That keeps Krust AI useful without turning old notes into false certainty.


Approval Gates Are Part of the Agent Design

Kubernetes agents become dangerous when reading and writing feel the same.

Krust separates them.

Read-only tools can run automatically because they collect evidence. Write tools require approval because they change the cluster. Before requesting a write, the agent should explain what will happen, why it is the right fix, and the blast radius.

That is why the skill system is paired with tool safety levels. A good workflow can recommend a next action, but production mutation still belongs behind a human-in-the-loop gate.

The agent can help you get from “something is wrong” to “this patch is probably correct.” It should not silently jump from diagnosis to mutation.


What This Means for Kubernetes AI Tools

The next useful generation of Kubernetes AI tooling will not be won by the longest prompt.

It will be won by products that combine:

  • live Kubernetes API access
  • UI-aware resource context
  • task-specific skills
  • local memory with freshness rules
  • explicit read/write safety boundaries
  • concise evidence-first output

That is the path Krust is taking.

The agent is not meant to replace knowing Kubernetes. It is meant to remove the mechanical work around diagnosis: finding the right pod, pulling the right logs, checking the right events, comparing the right fields, and remembering the last confirmed fix.

For production operations, that is the useful shape of an AI Kubernetes dashboard: not a chatbot beside the workflow, but an agent inside the workflow.


Try Krust AI

brew install --cask vanchonlee/tap/krust

Open Settings -> AI, choose a provider, and bring your own API key. Krust supports cloud providers and local models through Ollama.

Then open the agent with Cmd+Shift+A, type $ to browse skills, or use @ to mention the resource you want the agent to inspect.

Continue with Krust AI diagnostics, read how Krust AI memory works, or compare the broader Kubernetes dashboard alternative guide.