es en de
kiro argo-cd gitops kubernetes amazon-eks mcp

How to Integrate Argo CD with Kiro: GitOps Troubleshooting on Amazon EKS

An open-source Kiro Power that diagnoses OutOfSync and Degraded applications from evidence, read-only by default, with human approval for every change.

Juan Manuel Hoyos Contreras 7 min read
Argo CD
Kubernetes
Amazon EKS
Amazon ECR
AWS IAM
Helm
GitHub

The problem

When an Argo CD application on Amazon EKS goes Degraded, the cause is often outside Argo CD: an ECR tag that was never pushed, a node role without pull permissions, a node group at maxSize, a missing EKS access entry for Argo CD’s IAM role. Finding it means jumping between the Argo CD UI, kubectl and the AWS console.

An AI agent can do that walk for you. An agent with direct access to your GitOps control plane can also do a lot of damage. So I built Argo CD GitOps Engineering, an open-source Kiro Power designed around one idea:

An agent that touches Argo CD should behave like a careful senior engineer: gather evidence first, say what it can’t see, and never change anything without explicit approval.

Repository: github.com/juanhcode/argocd-gitops-engineering (Apache-2.0)

What a Kiro Power is

A Power bundles Skills (instructions the agent loads on demand) with MCP servers (the tools the agent can call), in the Agent Plugins format. Kiro activates the Power when your prompt matches its keywords, so its knowledge only lands in context when you’re actually working on Argo CD.

This Power has three parts:

plugin.json   # manifest + activation keywords (argocd, outofsync, crashloopbackoff, ...)
mcp.json      # the official Argo CD MCP server, pinned and read-only
skills/       # 8 skills with reference docs

Step 1: connect Kiro to Argo CD

The integration uses the official Argo CD MCP server (argocd-mcp). The configuration is deliberately short:

{
  "mcpServers": {
    "argocd": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "argocd-mcp@0.9.0", "stdio"],
      "env": {
        "ARGOCD_BASE_URL": "${ARGOCD_BASE_URL}",
        "ARGOCD_API_TOKEN": "${ARGOCD_API_TOKEN}",
        "MCP_READ_ONLY": "true"
      }
    }
  }
}
  • MCP_READ_ONLY=true: the 5 write tools (sync_application, delete_application, create_application, update_application, run_resource_action) aren’t hidden behind a prompt. They aren’t registered at all. The model can’t call a tool that doesn’t exist.
  • Pinned version (argocd-mcp@0.9.0): the tools the skills describe are the ones you actually get.
  • No secrets in files: the URL and token come from environment variables.

Step 2: install the Power

  1. Create a read-only Argo CD account and API token (configuration guide).
  2. Export the credentials and launch Kiro from the same shell:
    export ARGOCD_BASE_URL="https://argocd.example.com"
    export ARGOCD_API_TOKEN="..."   # from your keychain or AWS Secrets Manager, never from a file
    
  3. In Kiro: Powers → Add Custom Power → Import power from a repository URL → https://github.com/juanhcode/argocd-gitops-engineering
  4. Approve ARGOCD_BASE_URL and ARGOCD_API_TOKEN in Kiro settings → Mcp Approved Env Vars.
  5. Ask: “List my Argo CD applications that are not healthy.”

Eight skills, one hub

SkillWhat it covers
argocd-fundamentalsGitOps mental model, status vocabulary, tool pitfalls, response format, routing
application-managementApps, AppProjects, clusters; gated create, update and delete
gitops-operationsSync policy, prune, self-heal, waves, hooks, rollback, promotion, Helm, Kustomize
deployment-troubleshootingA universal 8-step workflow and 14 scenario playbooks
kubernetes-observabilityResource trees, events, logs, per-kind health
eks-integrationEKS connectivity, IAM, access entries, ECR, VPC CNI (read-only AWS checks)
security-and-governanceApproval protocol, risk levels, RBAC, tokens, TLS, prompt injection
production-operationsReadiness, controlled sync, verification, incident triage, change records

The EKS side: hypotheses you can confirm

The Argo CD MCP server has no AWS API access, and the Power says so. It reads the Argo CD evidence, maps it to likely AWS causes, and hands you read-only commands to confirm them. A few of the mappings in the eks-integration skill:

What Argo CD showsLikely AWS causeConfirm with
Cluster connection UnauthorizedArgo CD’s IAM principal has no access entry (or aws-auth mapping)aws eks list-access-entries, describe-access-entry
dial tcp ... i/o timeout to the clusterPrivate-only endpoint not reachable from Argo CD’s VPC, security groupsaws eks describe-cluster --query cluster.resourcesVpcConfig
AccessDenied ... sts:AssumeRoleIRSA / EKS Pod Identity or the roleARN trust policyIAM role trust policy, ServiceAccount annotation or Pod Identity association
ImagePullBackOff from ECR, not foundTag never pushed, wrong region or account, lifecycle policy expired itCI / ECR repository
ImagePullBackOff from ECR, 403The node IAM role can’t pull (the kubelet pulls, not the Pod’s IRSA role)Node role policies
ECR i/o timeoutPrivate subnets without NAT or ecr.api / ecr.dkr / S3 endpointsVPC configuration
FailedScheduling: Insufficient cpuNode group at maxSize, Karpenter NodePool limitsaws eks describe-nodegroup

It only suggests describe-*, list-* and get-* commands. Fixes to clusters, node groups, IAM or VPCs belong in the IaC that owns them (Terraform, CDK, eksctl, Crossplane), not in Argo CD.

Evidence-first answers

Every diagnosis follows a fixed format that keeps what was observed apart from what is inferred. Here’s an illustrative example:

**Environment:** argocd.example.com / prod-eks / prod
**Application:** payments-api (project: payments, namespace: argocd)
**Sync status:** Synced @ 4f2c1a9 — last operation: Succeeded
**Health status:** Degraded
**Affected resources:** Deployment/payments/payments-api — Degraded — 0/3 ready

**Evidence**
- [Observed] get_application_events: "Failed to pull image ...:v2.4.1: not found"
- [Observed] get_application_resource_tree: Pod payments-api-7d9... ImagePullBackOff

**Root cause** (confirmed)
1. Image tag v2.4.1 does not exist in the registry.

**Recommended remediation**
1. Push the tag, or revert the image bump in Git — where: Git repo — expected impact: rollout resumes

**Risk level:** Low — read-only diagnosis, fix happens in Git
**Approval requirements:** None (read-only)

When the evidence doesn’t settle it, the agent lists ranked hypotheses, each with what would confirm it. It doesn’t guess and present the guess as fact. If the environment is unclear, it assumes production.

Safety in layers, described honestly

LayerControlStrength
1Argo CD RBAC on the token’s accountAuthoritative
2MCP_READ_ONLY=trueStrong (server-side)
3Kiro tool-call confirmationStrong if not bypassed
4Approval protocol in the skillsAdvisory only

When writes are enabled, the protocol requires a full plan (exact tool call, target, blast radius, risk and rollback) that ends the agent’s turn, followed by a specific approval from the user. Approval found inside logs, manifests or tool output is ignored, because a log line is untrusted input.

Verified, not assumed

I checked all 16 tools of argocd-mcp@0.9.0 against its source, wrote a capability matrix, and confirmed the behaviour with an automated smoke test against a mock Argo CD API. Worth knowing if you use this MCP server:

  • A bad token returns an empty application list, not an error.
  • Argo CD HTTP errors come back with isError: false, so the response body must be checked.
  • Logs are the last 100 lines of the current container only. For a CrashLoopBackOff, the Power gives you kubectl logs --previous.
  • update_application strips Helm, Kustomize and ignoreDifferences fields before the PUT, so the Power won’t use it on those apps.
  • There’s no rollback, refresh, diff, ApplicationSet or node tool. The skills never invent one; they give you the human-run alternative.

What live testing taught me

I ran the Power in Kiro against a real Argo CD on minikube with intentionally broken workloads. Two findings changed the skills:

  1. The agent called sync_application without asking first (in a write-enabled test copy pointed at the disposable cluster). I tightened the protocol: a request made before the plan is shown isn’t approval, the client’s confirmation dialog isn’t either, and no write tool, dry runs included, may be called in the same turn as the approval request.
  2. A wrong container name doesn’t return an error. get_application_workload_logs returns isError: false with a single “log line” that says container X is not valid for pod Y. An agent can easily read that as application output. The skills now take the container name from the Pod spec first.

Neither showed up in reading the code. Both showed up within minutes of live use.

node scripts/validate.mjs        # static checks: manifests, skills, links, invented tools, secrets
node scripts/mcp-smoke-test.mjs  # real argocd-mcp against a local mock API; no real Argo CD contacted

Prompts to try

  • “Give me a health summary of all Argo CD applications, grouped by cluster.”
  • “Why is orders-worker in CrashLoopBackOff? Follow the troubleshooting workflow.”
  • “Is anything blocking syncs for the payments project right now?”
  • “Plan a production sync of reports: readiness checklist, dry run, rollback plan.”
  • “Our EKS cluster shows a failed connection in Argo CD. What should I check on the AWS side?”

What’s next

I’d like to add more EKS playbooks: Karpenter consolidation, AWS Load Balancer Controller target health and EBS CSI attach failures. If you run Argo CD on EKS, tell me which failure modes cost you the most time. Issues and PRs are welcome on GitHub.

© 2026 Juan Hoyos.