Instruction CRD gives you a first-class Kubernetes resource for managing LLM system prompts. Instead of embedding a system prompt directly inside an Agent manifest — where it is easy to let it drift or go unreviewed — you create a standalone Instruction with a content field containing the prompt text. The operator stores this text in a ConfigMap and makes it available to any agent that references it. Because Instruction is a proper Kubernetes resource, you can version-control it, apply RBAC to it, diff it in pull requests, and share it across many agents without duplication.
API reference
Spec fields
TheInstruction spec contains a single required field:
Creating an Instruction
status.configMapName.
Status fields
Referencing an Instruction from an Agent
Agents support two ways to attach a system prompt throughspec.instruction:
Inline — the operator creates a child Instruction CR automatically:
Instruction CR across multiple agents:
The
instructionRef approach is also required for the template runtime mode, where the operator builds the agent deployment from scratch and needs a stable reference to the system prompt.Sharing one Instruction across many agents
A key benefit of theInstruction CRD is the ability to keep a single source of truth for a prompt and reference it from any agent in the cluster:
kubectl operations
Best practices
- Keep prompts focused — each
Instructionshould describe one agent persona or behaviour. Avoid combining unrelated responsibilities in a single prompt. - Version-control every
Instructionmanifest — because prompts directly influence agent behaviour, treat them with the same rigour as application code: peer review, changelogs, and staged rollouts. - Use namespaces to control sharing — place shared, canonical prompts in a dedicated namespace (e.g.,
shared-resources) and use RBAC to control who can modify them. - Prefer
instructionRefover inlinetemplatefor production agents — a standaloneInstructionCR is easier to audit, update, and roll back independently of theAgentmanifest. - Test prompt changes in a staging namespace before promoting them to production by creating a separate
InstructionCR in your staging namespace and verifying agent behaviour. - Annotate with context — use
metadata.annotationsto record the author, last-reviewed date, and linked issue or pull request for eachInstruction.
