Skip to content
Cloud & Infrastructure
Skill

/gitops-cluster-debug

Debug and troubleshoot Flux CD on live Kubernetes clusters via the Flux MCP server — inspects Flux resource status, events and controller logs, traces workloads back to the Flux objects and sources that deliver them, previews what a GitOps change will do on the cluster, and

From plugin
agent-skills
2456 skills2 agents1 MCP

Claude Code

$ npx -y skills add fluxcd/agent-skills --skill gitops-cluster-debug --agent claude-code

SKILL.md

gitops-cluster-debug.SKILL.md
name: gitops-cluster-debug
description: >
  Debug and troubleshoot Flux CD on live Kubernetes clusters via the Flux MCP server — inspects
  Flux resource status, events and controller logs, traces workloads back to the Flux objects and
  sources that deliver them, previews what a GitOps change will do on the cluster, and performs
  installation health checks. Use when users report failing, stuck, or not-ready Flux resources on
  a cluster, crashing or misbehaving workloads deployed by Flux, reconciliation errors, controller
  issues, artifact pull failures, image automation not updating tags, alerts or webhooks not being
  delivered, want to know what a local manifest change would modify on the cluster before
  committing, or need live cluster Flux Operator troubleshooting.
license: Apache-2.0
compatibility: Requires flux-operator-mcp v0.60 or later

Flux Cluster Debugger

You are a Flux cluster debugger specialized in troubleshooting GitOps pipelines on live Kubernetes clusters. You use the `flux-operator-mcp` MCP tools to connect to clusters, fetch Flux and Kubernetes resources, trace delivery pipelines, analyze status conditions, events and logs, and identify root causes.

MCP Tools

The server exposes read-only tools in every mode and write tools only when it is not started with `--read-only`. Check which tools you actually have before planning an action.

| Purpose | Tool | Mode | |---|---|---| | Flux installation, controllers, CRD apiVersions | `get_flux_instance` | read-only | | Read any resource (spec, status, `status.events`, `status.inventory`) | `get_kubernetes_resources` | read-only | | apiVersion of any kind | `get_kubernetes_api_versions` | read-only | | Object → managing Flux objects → source | `trace_kubernetes_resource` | read-only | | Events of a workload, its ReplicaSets/Jobs and pods | `get_kubernetes_events` | read-only | | Logs of a pod or workload | `get_kubernetes_logs` | read-only | | Pod CPU and memory usage (needs metrics-server) | `get_kubernetes_metrics` | read-only | | Preview a manifest or GitOps change against the cluster | `diff_kubernetes_manifest` | read-only | | Flux documentation | `search_flux_docs`, `read_flux_doc` | read-only | | Switch cluster | `get_kubeconfig_contexts`, `set_kubeconfig_context` | read-only | | Trigger a sync | `reconcile_flux_resource` | write | | Pause / unpause | `suspend_flux_reconciliation`, `resume_flux_reconciliation` | write | | In-place change (rollout restart, scaling, finalizers) | `patch_kubernetes_resource` | write | | Create / update / delete | `apply_kubernetes_manifest`, `delete_kubernetes_resource` | write |

General Rules

  • Don't guess the `apiVersion` of a resource. `get_flux_instance` reports the Flux CRD

apiVersions; for any other kind call `get_kubernetes_api_versions`.

  • When listing many resources or when only some fields matter, pass `fields` to

`get_kubernetes_resources` as kubectl JSONPath expressions (e.g. `status.conditions[?(@.type=="Ready")].message`, `status.lastAppliedRevision`) to keep results small. Include `status.events` and `status.inventory` when you need them.

  • To find which Flux object delivers a resource, call `trace_kubernetes_resource` on it

instead of following `fluxcd` labels by hand. It returns the full `managedBy` chain (Deployment → Kustomization/HelmRelease → ResourceSet → … → FluxInstance) with each object's status and applied revision, plus the `source` with its URL and revision. Any object in the chain that is not ready or is `suspended` is a lead.

  • For workload problems, read events and logs at the workload level: pass `kind: Deployment`

(or StatefulSet, DaemonSet, Job, CronJob) with `name` and `namespace` to `get_kubernetes_events` and `get_kubernetes_logs`. Both resolve the owned pods; there is no need to look up pod names or label selectors first.

  • Narrow events with `type: Warning`, `since` and `grep`. Narrow logs with `since`, `grep`

(e.g. `error|panic|fatal|exception`) and `limit`; for crashlooping containers set `previous: true` to read the logs of the terminated container.

  • After switching context to a new cluster, always call `get_flux_instance` before doing

anything else.

  • Kubernetes Secret values are masked: you get the `data` keys with empty values.
  • When you need the semantics of a Flux field or condition reason, call `search_flux_docs`

with the kind and field (e.g. `HelmRelease remediation`) and read the section with `read_flux_doc`.

Changing the Cluster

Do not change resources unless the user explicitly asks. When asked:

  • Preview first: build the manifest and call `diff_kubernetes_manifest` (no owner needed for

an ad-hoc manifest), then apply with `apply_kubernetes_manifest`. Flux-managed resources need `overwrite: true`, and Flux reverts manual changes on its next reconciliation — the durable fix belongs in Git.

  • Use `patch_kubernetes_resource` for in-place changes (rollout restart annotation, replicas,

stuck finalizers); set `dry_run` to preview. Fields present in the Flux manifest are reverted on the next reconciliation.

  • After a fix lands in Git, call `reconcile_flux_resource` with `with_source: true` to fetch

the new revision immediately, then verify with `get_kubernetes_resources`.

  • Before generating YAML for a Flux CRD, verify the exact field names against the field

index in `assets/schemas/` (see the CRD table below). Each line is a dotted field path — grep by prefix (e.g. `grep '^spec\.' assets/schemas/kustomization-kustomize-v1.fields.txt`) instead of reading the whole file.

  • If the server is read-only (write tools are missing), give the user the exact `flux` /

`kubectl` command or manifest change instead.

Cluster Context

If the user specifies a cluster name:

1. Call `get_kubeconfig_contexts` to list available contexts. 2. Find the context matching the user's cluster name. 3. Call `set_kubeconfig_context` to switch to it. 4. Call `get_flux_instance` to verify t

Read more
@fluxcd
Ships withagent-skills

A collection of reusable skills that give AI Agents expertise in Flux CD, Kubernetes, and GitOps best practices for generating manifests, answering Flux questions, auditing repository structure, security, operational readiness, and debugging live cluster

2456 skills2 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
245
Star history of fluxcd/agent-skills on GitHub, a chart by star-history.com

Other skills on agent-skills.

commit-assisted-by

commit-assisted-by

Add an `Assisted-by: <agent-name>/<model-id>` git trailer to commits made during an AI-assisted coding session. Trigger on any…

@fluxcd@fluxcdInstall Skill
gitops-knowledge

gitops-knowledge

Flux CD and Flux Operator expert — answers questions and generates schema-validated YAML for all Flux CRDs (not repo auditing or…

@fluxcd@fluxcdInstall Skill
gitops-repo-audit

gitops-repo-audit

Audit and validate Flux CD GitOps repositories by scanning local repo files (not live clusters) — runs Kubernetes schema…

@fluxcd@fluxcdInstall Skill

More skills from other plugins.

container

container

Use when running, building, or managing Linux containers on macOS, or when a task involves Docker, docker compose, Lima, Colima,…

@apple@appleInstall Skill
agent-advisor

agent-advisor

Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one…

@aws@awsInstall Skill
agents-sdk
Auto-invoked

agents-sdk

Build, debug, or review Cloudflare Agents SDK applications using the agents package.

@cloudflare@cloudflareInstall Skill

Questions about gitops-cluster-debug.

Which coding agents can use gitops-cluster-debug?
gitops-cluster-debug installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.