Gitops Cluster Debug logo

Gitops Cluster Debug

Organization
fluxcd
gitops-cluster-debug

Debug and troubleshoot Flux CD on live Kubernetes clusters (not local repo files) via the Flux MCP server — inspects Flux resource status, reads controller logs, traces dependency chains, and performs installation health checks. Use when users report failing, stuck, or not-ready Flux resources on a cluster, reconciliation errors, controller issues, artifact pull failures, image automation not updating tags, alerts or webhooks not being delivered, or need live cluster Flux Operator troubleshooting.

Overview

Publisherfluxcd
Repositoryagent-skills
Skill namegitops-cluster-debug
Stars
233
Forks
12
Bundled files
22
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 22 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by fluxcd on GitHub. Read the source before you install it.

Installation

Install the Gitops Cluster Debug AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/fluxcd/agent-skills/tree/main/skills/gitops-cluster-debug
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fluxcd/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/gitops-cluster-debug .claude/skills/gitops-cluster-debug
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Gitops Cluster Debug in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Gitops Cluster Debug on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Gitops Cluster Debug is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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, analyze status conditions, inspect logs, and identify root causes.

General Rules

  • Don't assume the apiVersion of any Kubernetes or Flux resource — call get_kubernetes_api_versions to find the correct one.
  • To determine if a Kubernetes resource is Flux-managed, look for fluxcd labels in the resource metadata.
  • After switching context to a new cluster, always call get_flux_instance to determine the Flux Operator status, version, and settings before doing anything else.
  • When creating or updating resources on the cluster, generate a Kubernetes YAML manifest and call the apply_kubernetes_manifest tool. When the target resource is managed by Flux, the tool errors unless overwrite is set to true. Do not apply resources unless explicitly requested by the user. Before generating any YAML manifest, verify the exact field names and nesting against the field index in assets/schemas/. Index files follow the naming convention {kind}-{group}-{version}.fields.txt; each line is a dotted field path — grep by path prefix (e.g. grep '^spec\.' assets/schemas/kustomization-kustomize-v1.fields.txt) instead of reading the whole file (see the CRD reference table below).
  • You will not be able to read the values of Kubernetes Secrets, the MCP server will return only the data field with keys but empty values.

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 the Flux installation on that cluster.

If no cluster is specified, debug on the current context. Still call get_flux_instance at the start to understand the Flux installation.

Debugging Workflows

Adapt the depth based on what the user asks for. A targeted question ("why is my HelmRelease failing?") can skip straight to the relevant workflow. A broad request ("debug my cluster") should start with the installation check.

Workflow 1: Flux Installation Check

  1. Call get_flux_instance to check the Flux Operator status and settings.
  2. Verify the FluxInstance reports Ready: True.
  3. Check controller deployment status — all controllers should be running.
  4. Review the FluxReport for cluster-wide reconciliation summary.
  5. If controllers are not running or crashlooping, analyze their logs using get_kubernetes_logs on the controller pods.

Workflow 2: HelmRelease Debugging

Follow these steps when troubleshooting a HelmRelease:

  1. Call get_flux_instance to check the helm-controller deployment status and the apiVersion of the HelmRelease kind.
  2. Call get_kubernetes_resources to get the HelmRelease, then analyze the spec, status, inventory, and events.
  3. Determine which Flux object manages the HelmRelease by looking at the annotations — it can be a Kustomization or a ResourceSet.
  4. If valuesFrom is present, get all the referenced ConfigMap and Secret resources.
  5. Identify the HelmRelease source by looking at the chartRef or sourceRef field.
  6. Call get_kubernetes_resources to get the source, then analyze the source status and events.
  7. If the HelmRelease is in a failed state or in progress, check the managed resources found in the inventory.
  8. Call get_kubernetes_resources to get the managed resources and analyze their status.
  9. If managed resources are failing, analyze their logs using get_kubernetes_logs.
  10. Create a root cause analysis report. If no issues are found, report the current status of the HelmRelease and its managed resources and container images.

Workflow 3: Kustomization Debugging

Follow these steps when troubleshooting a Kustomization:

  1. Call get_flux_instance to check the kustomize-controller deployment status and the apiVersion of the Kustomization kind.
  2. Call get_kubernetes_resources to get the Kustomization, then analyze the spec, status, inventory, and events.
  3. Determine which Flux object manages the Kustomization by looking at the annotations — it can be another Kustomization or a ResourceSet.
  4. If substituteFrom is present, get all the referenced ConfigMap and Secret resources.
  5. Identify the Kustomization source by looking at the sourceRef field.
  6. Call get_kubernetes_resources to get the source, then analyze the source status and events.
  7. If the Kustomization is in a failed state or in progress, check the managed resources found in the inventory.
  8. Call get_kubernetes_resources to get the managed resources and analyze their status.
  9. If managed resources are failing, analyze their logs using get_kubernetes_logs.
  10. Create a root cause analysis report. If no issues are found, report the current status of the Kustomization and its managed resources.

Workflow 4: ResourceSet Debugging

Follow these steps when troubleshooting a ResourceSet:

  1. Call get_flux_instance to check the Flux Operator status and the apiVersion of the ResourceSet kind.
  2. Call get_kubernetes_resources to get the ResourceSet, then analyze the spec, status conditions, and events.
  3. If the ResourceSet uses inputsFrom, get each referenced ResourceSetInputProvider and check its status. A Stalled or Ready: False provider means the ResourceSet has no inputs to render.
  4. If the ResourceSet has dependsOn, get each dependency and verify it is Ready. ResourceSet dependencies can reference any Kubernetes resource kind (other ResourceSets, Kustomizations, HelmReleases, CRDs) — check the apiVersion and kind in each entry.
  5. Check the ResourceSet inventory for generated resources. Get the generated Kustomizations, HelmReleases, or other Flux resources and analyze their status.
  6. If generated resources are failing, follow Workflow 2 (HelmRelease) or Workflow 3 (Kustomization) to debug them individually.
  7. Create a root cause analysis report. Distinguish between ResourceSet-level failures (template errors, missing inputs, RBAC) and failures in the generated resources.

Workflow 5: Source Debugging

Follow these steps when a source (GitRepository, OCIRepository, HelmRepository, HelmChart, Bucket) reports FetchFailed or downstream resources are stuck on an old revision:

  1. Call get_flux_instance to check the source-controller deployment status and the apiVersion of the source kind.
  2. Call get_kubernetes_resources to get the source, then analyze the status conditions (Ready, FetchFailed, ArtifactInStorage), the artifact revision, and events.
  3. For authentication errors, get the referenced secretRef Secret and verify it exists with the expected key names (values are masked). For cloud registries with no secret, check .spec.provider and workload identity.
  4. For HelmChart failures, verify the referenced HelmRepository or GitRepository is Ready first — chart errors are often upstream source errors.
  5. Compare the last reconcile time against .spec.interval — a stale artifact with no error can mean a suspended source or an overloaded controller.
  6. Identify downstream consumers (Kustomizations/HelmReleases whose sourceRef points at this source) and note which revision they are stuck on.
  7. Create a root cause analysis report. Load references/troubleshooting.md (Source Failures) for per-source cause lists — auth key names, Cosign verification, layerSelector mismatches, semver constraints.

Workflow 6: Image Automation Debugging

Follow these steps when image tags are not being detected or no update commits appear in Git:

  1. Call get_flux_instance and verify image-reflector-controller and image-automation-controller are listed in the components and running.
  2. Get the ImageRepository — check Ready, last scan time, and tag count in status. Auth failures point to the secretRef or .spec.provider.
  3. Get the ImagePolicy — check Ready and status.latestImage. If nothing is selected, compare the policy rules against the tags actually scanned.
  4. Get the ImageUpdateAutomation — check Ready, last push time, and events. Verify its sourceRef GitRepository has write-capable credentials and .spec.git.push.branch is the branch the user is watching.
  5. If everything is Ready but no commits appear: verify manifests under .spec.update.path contain $imagepolicy markers for the right <namespace>:<policy-name> and that latestImage differs from Git.
  6. Create a root cause analysis report tracing ImageRepository → ImagePolicy → ImageUpdateAutomation → GitRepository.

Workflow 7: Notification Debugging

Follow these steps when alerts are not being delivered or a webhook Receiver does not trigger reconciliation:

  1. Call get_flux_instance to check the notification-controller deployment status.
  2. Provider and Alert have no status conditions — diagnose delivery from notification-controller logs (Workflow 8): look for dispatch errors such as HTTP 401/404 or timeouts.
  3. Get the Alert and verify .spec.eventSources matches the resources expected to produce events and .spec.eventSeverity is not filtering them out.
  4. Get the referenced Provider and verify .spec.type, .spec.address, and the secretRef Secret key names.
  5. For Receivers (these do have a Ready condition): verify status.webhookPath and the webhook Secret, then check logs for incoming requests to that path — none means the external service is not calling the webhook.
  6. To generate a test event, suggest a manual reconcile request on a watched resource and watch the logs for the dispatch attempt. Load references/troubleshooting.md (Notification Failures) for cause lists.

Workflow 8: Kubernetes Logs Analysis

When analyzing logs for any workload:

  1. Get the Kubernetes Deployment that manages the pods using get_kubernetes_resources.
  2. Extract the matchLabels and container name from the deployment spec.
  3. List the pods with get_kubernetes_resources using the found matchLabels.
  4. Get the logs by calling get_kubernetes_logs with the pod name and container name.
  5. Analyze the logs for errors, warnings, and patterns that indicate the root cause.

Flux CRD Reference

Use this table to check API versions and grep the field index when needed.

ControllerKindapiVersionField Index
flux-operatorFluxInstancefluxcd.controlplane.io/v1fluxinstance-fluxcd-v1.fields.txt
flux-operatorFluxReportfluxcd.controlplane.io/v1fluxreport-fluxcd-v1.fields.txt
flux-operatorResourceSetfluxcd.controlplane.io/v1resourceset-fluxcd-v1.fields.txt
flux-operatorResourceSetInputProviderfluxcd.controlplane.io/v1resourcesetinputprovider-fluxcd-v1.fields.txt
source-controllerGitRepositorysource.toolkit.fluxcd.io/v1gitrepository-source-v1.fields.txt
source-controllerOCIRepositorysource.toolkit.fluxcd.io/v1ocirepository-source-v1.fields.txt
source-controllerBucketsource.toolkit.fluxcd.io/v1bucket-source-v1.fields.txt
source-controllerHelmRepositorysource.toolkit.fluxcd.io/v1helmrepository-source-v1.fields.txt
source-controllerHelmChartsource.toolkit.fluxcd.io/v1helmchart-source-v1.fields.txt
source-controllerExternalArtifactsource.toolkit.fluxcd.io/v1externalartifact-source-v1.fields.txt
source-watcherArtifactGeneratorsource.extensions.fluxcd.io/v1beta1artifactgenerator-source-v1beta1.fields.txt
kustomize-controllerKustomizationkustomize.toolkit.fluxcd.io/v1kustomization-kustomize-v1.fields.txt
helm-controllerHelmReleasehelm.toolkit.fluxcd.io/v2helmrelease-helm-v2.fields.txt
notification-controllerProvidernotification.toolkit.fluxcd.io/v1beta3provider-notification-v1beta3.fields.txt
notification-controllerAlertnotification.toolkit.fluxcd.io/v1beta3alert-notification-v1beta3.fields.txt
notification-controllerReceivernotification.toolkit.fluxcd.io/v1receiver-notification-v1.fields.txt
image-reflector-controllerImageRepositoryimage.toolkit.fluxcd.io/v1imagerepository-image-v1.fields.txt
image-reflector-controllerImagePolicyimage.toolkit.fluxcd.io/v1imagepolicy-image-v1.fields.txt
image-automation-controllerImageUpdateAutomationimage.toolkit.fluxcd.io/v1imageupdateautomation-image-v1.fields.txt

Loading References

Load reference files when you need deeper information:

  • flux-crds.md — When you need detailed CRD field descriptions, status conditions, common failures, or the resource relationship diagram
  • troubleshooting.md — When diagnosing a specific failure pattern or when you need the general debugging checklist

Report Format

As you trace through any debugging workflow, record each resource you inspect (kind, name, namespace, status) to build the dependency chain for the report.

Structure debugging findings as a markdown report with these sections:

  1. Summary — cluster name, Flux version, resource under investigation, current status
  2. Resource Analysis — detailed breakdown of the resource spec, status conditions, and events
  3. Dependency Chain — trace from source to applier to managed resources (e.g., GitRepository → Kustomization → Deployments)
  4. Root Cause — identified root cause with evidence from status conditions, events, and logs
  5. Recommendations — prioritized steps to resolve the issue, with exact commands or manifest changes

Edge Cases

  • No Flux installed: If get_flux_instance returns no FluxInstance, tell the user that Flux is not installed on the cluster. Suggest installing the Flux Operator.
  • MCP server unavailable: If MCP tools fail to connect, tell the user that the flux-operator-mcp server is not running. Provide the install command.
  • Suspended resources: If a Flux resource has .spec.suspend: true, note that it is intentionally suspended and won't reconcile until resumed. Don't flag this as an error unless the user expects it to be active.
  • Progressing resources: If a resource shows Ready: Unknown with reason Progressing, it is actively reconciling. Wait for the reconciliation to complete before diagnosing. Note the last transition time.
  • Flux-managed resources: Resources with fluxcd labels are managed by Flux. Warn the user before applying manual changes — Flux will revert them on the next reconciliation.
  • Stale status: If the last reconciliation time is old relative to the configured interval, the controller may be overloaded or stuck. Check controller logs for backpressure or errors.
  • Cluster context not found: If the user's cluster name doesn't match any available context, list the available contexts and ask the user to clarify.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Gitops Cluster Debug AI skill do?

Debug and troubleshoot Flux CD on live Kubernetes clusters (not local repo files) via the Flux MCP server — inspects Flux resource status, reads controller logs, traces dependency chains, and performs installation health checks. Use when users report failing, stuck, or not-ready Flux resources on a cluster, reconciliation errors, controller issues, artifact pull failures, image automation not updating tags, alerts or webhooks not being delivered, or need live cluster Flux Operator troubleshooting.

Why use Gitops Cluster Debug on TypingMind?

Because you install it once and use it with any model. Gitops Cluster Debug is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Gitops Cluster Debug in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fluxcd/agent-skills/tree/main/skills/gitops-cluster-debug. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Gitops Cluster Debug?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Gitops Cluster Debug?

As many as you like. As long as a model supports skills, you can use Gitops Cluster Debug with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Gitops Cluster Debug AI skill free?

Yes. It is published on GitHub by fluxcd under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇