Agent Capabilities
The Kubernetes Agent (k8s-autopilot) acts as both an Expert Architect (Writer) and a Reliable Operator (Manager), bridging the gap between abstract requirements and running infrastructure. As of v0.3.0, it also includes a dedicated ArgoCD onboarding sub-agent for safe GitOps operations.
đī¸ 1. Helm Chart Generation (The Architect)â
The agent doesn't just "write YAML"; it architects solutions through a rigorous Planning â Generation â Validation pipeline.
Intelligent Planningâ
- Gap Detection: Automatically identifies missing critical information (e.g., "You didn't specify a container port") and interviews the user to fill gaps.
- Complexity Analysis: Classifies requests (Simple/Medium/Complex) to determine the necessary resource depth (e.g., needing HPA vs. simple Deployment).
- Architecture Design: Selects the right workload pattern (Deployment vs. StatefulSet) based on application semantics (stateless vs. stateful).
Orchestrated Generationâ
- Multi-File Assembly: Generates a complete chart structure (
Chart.yaml,values.yaml,templates/*.yaml) in one go. - Dependency Management: Understands resource dependencies (e.g., Service must exist before Ingress references it).
- Best Practices: Applies industry standards by default (e.g., Bitnami-style
_helpers.tpl, resource limits, liveness probes).
Validation & Self-Healingâ
- Triple-Check Validation:
- Lint: Generic syntax checking.
- Template: Verifies logic flow and variable interpolation.
- Dry-Run: Checks server-side compatibility against the live cluster.
- Autonomous Self-Healing: If validation fails (e.g., "Indent error on line 42"), the agent automatically fixes the file and retries without pestering the user.
đšī¸ 2. Helm Management (The Operator)â
The agent manages the lifecycle of applications with a "Safety First" philosophy, using a Dual-Path Architecture.
Discovery & Contextâ
- Smart Search: Finds charts across multiple repositories (Bitnami, internal, etc.).
- State Inspection: Checks if a release already exists to switch automatically between "Install" and "Upgrade" modes.
- Schema Analysis: Reads
values.schema.jsonto understand valid configuration options.
Safe Execution Pipelineâ
For every state-changing operation (Install/Upgrade/Uninstall), the agent enforces a 5-Phase Safety Pipeline:
- Discovery: Gather facts.
- Values Confirmation: Show user the diff between "Current" and "Proposed" config.
- Planning: Generate a detailed execution plan.
- Approval: Wait for explicit human sign-off ("The Nuclear Button").
- Execution: Perform the atomic Helm operation.
Lifecycle Managementâ
- Atomic Upgrades: Uses
helm upgrade --atomicto ensure automatic rollback on failure. - Instant Rollback: Can revert to any previous revision if an upgrade introduces bugs.
- Release History: Audits the deployment timeline to understand evolution.
đ§ 3. ArgoCD Onboarding Operations (GitOps Operator)â
The ArgoCD onboarding sub-agent manages projects, repositories, and applications with human-in-the-loop safety.
What it can doâ
- Projects: Create / get / list / update / delete ArgoCD projects.
- Repositories: List / get / onboard (HTTPS/SSH) / delete repositories.
- Applications: List / get / create / update / delete, sync apps, preview diffs, check sync status.
- Debug: Fetch application logs and events when troubleshooting.
Safety & Workflow Guaranteesâ
- Plan Preview: Shows a human-friendly plan before any state changes.
- Prerequisite Validation: Always checks project/repo/app state via MCP before acting.
- Deterministic HITL Gates: Approval interrupts for risky operations (create/delete/sync).
- Exact-Name Confirmation: Required for destructive deletes.
đ 4. Troubleshooting & Observabilityâ
The agent acts as a Level-1 SRE to diagnose cluster issues.
Diagnosisâ
- Log Correlation: Fetches logs from crashing pods and correlates them with Kubernetes Events to find root causes (e.g., OOMKilled vs. Application Error).
- Resource Inspection: Deep-dives into Pod/Node descriptions to find scheduling bottlenecks or quota limits.
Remediationâ
- Actionable Advice: Doesn't just dump logs; analyzes them to suggest fixes (e.g., "Increase memory limit by 20%").
- Safe Exploration: Uses read-only tools to explore the cluster without risk of breaking production.
đĄī¸ Security & Governanceâ
| Capability | Description |
|---|---|
| RBAC-Aware | Operates strictly within the permissions of its Service Account. |
| Secret Management | Can generate and manage Kubernetes Secrets (Opaque, DockerRegistry). |
| Network Isolation | Capable of generating NetworkPolicy resources for traffic control. |
| Approval Gates | Human-In-The-Loop (HITL) is enforced hard-coded in the middleware for any destructive action. |
đ Integration Ecosystemâ
The agent extends its reach via MCP (Model Context Protocol).
- ArgoCD Integration: Manages projects, repos, and apps via ArgoCD MCP with approval gates.
- GitOps Ready: Can commit generated charts to Git repositories instead of applying them directly.
- Helm Ecosystem: Compatible with any standard Helm Chart repository.