Logo K8s Flux Troubleshooting

K8s Flux Troubleshooting

Tổ chức
k8s-servant
k8s-flux-troubleshooting

Dùng khi Flux không triển khai hoặc cập nhật được nội dung nào đó trên Kubernetes: GitRepository, OCIRepository hoặc HelmRepository không ở trạng thái Ready ("couldn't find remote ref", "authentication required"), Kustomization không ở trạng thái Ready ("kustomization path not found", "kustomize build failed", "dependency ... is not ready", hết thời gian chờ kiểm tra tình trạng), HelmRelease không ở trạng thái Ready (HelmChart "invalid chart reference", InstallFailed, UpgradeFailed, RetriesExceeded), thay đổi trong Git không bao giờ được áp dụng lên cluster hoặc các đối tượng Flux bị tạm ngưng. Kiểm tra bằng kubectl get, describe, events và logs, rồi đề xuất cách khắc phục. Trước tiên chỉ kiểm tra, và hỏi bạn trước khi thay đổi bất cứ điều gì.

Tổng quan

Nhà phát hànhk8s-servant
Kho mãk8s-skills
Tên kỹ năngk8s-flux-troubleshooting
Sao
36
Bản fork
7
Tệp đi kèm
4
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 4 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được k8s-servant công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI K8s Flux Troubleshooting trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-flux-troubleshooting
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/k8s-servant/k8s-skills.git /tmp/k8s-skills
mkdir -p .claude/skills
cp -r /tmp/k8s-skills/skills/k8s-flux-troubleshooting .claude/skills/k8s-flux-troubleshooting
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật K8s Flux Troubleshooting trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp K8s Flux Troubleshooting ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng K8s Flux Troubleshooting với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Flux troubleshooting

Find out why Flux does not deploy or update a workload, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.

Flux works in a chain. A source (GitRepository, OCIRepository, HelmRepository, Bucket) fetches an artifact. A Kustomization builds and applies a path from that artifact; a HelmRelease installs a chart, through a HelmChart that Flux creates from the HelmRelease. Every object reports Ready, and the first object in the chain that is not Ready holds the cause. Follow the chain from the object that deploys the workload back to its source.

The commands use placeholders: flux-system (where Flux and most of its objects live), my-app (the Kustomization or HelmRelease, and its source), and my-namespace (where the workload runs). Replace them with the real names; Flux objects can live in any namespace.

Never read Secrets: not Git or registry credentials, not SOPS keys, not values or postBuild substitutions from Secrets, not Helm release Secrets. The status of the Flux objects says when credentials are missing or wrong. For the same reason do not use flux tree, flux diff or flux debug ... --show-values / --show-vars: they read Secrets.

When to use

  • A change pushed to Git, an OCI registry or a Helm repository never reaches the cluster.
  • kubectl get kustomizations,helmreleases -A shows READY False or Unknown.
  • A GitRepository, OCIRepository, HelmRepository or HelmChart is not Ready.
  • Objects are SUSPENDED, or a HelmRelease is Stalled after failed installs or upgrades.

Hand-offs, by skill name. When the evidence points elsewhere, continue with that skill; if it is not installed, keep going with the steps here and tell the user which skill would help:

  • Flux applied the workload, but its pods fail (crash, image, probe, Pending): k8s-workload-troubleshooting.
  • A HelmRelease's install or upgrade fails inside Helm (hooks, ownership, immutable fields): read references/helmreleases.md first; for the Helm side, k8s-helm-troubleshooting.
  • The Flux controllers themselves crash or stay Pending: k8s-workload-troubleshooting.

Investigate

Work through the steps in order. Stop when you have the cause and its evidence.

1. List the Flux objects and their state. READY, STATUS (the Ready message) and SUSPENDED are the columns that matter.

bash
kubectl get kustomizations,helmreleases -A
kubectl get gitrepositories,ocirepositories,helmrepositories,helmcharts,buckets -A

2. Read the object that deploys the workload: its conditions, the source it points at, and its events.

bash
kubectl describe kustomization my-app -n flux-system
kubectl get kustomization my-app -n flux-system -o jsonpath='{.spec.sourceRef}{"\n"}{.spec.path}{"\n"}{.spec.suspend}{"\n"}{.status.conditions}{"\n"}'
kubectl describe helmrelease my-app -n flux-system
kubectl events -n flux-system --for kustomization/my-app

3. Read its source. A Kustomization's sourceRef, or the HelmChart a HelmRelease uses (named <namespace>-<name>, in the HelmRelease's namespace) and its HelmRepository or OCIRepository.

bash
kubectl describe gitrepository my-app -n flux-system
kubectl get gitrepository my-app -n flux-system -o jsonpath='{.spec.url}{"\n"}{.spec.ref}{"\n"}{.status.artifact.revision}{"\n"}{.status.conditions}{"\n"}'
kubectl describe helmchart flux-system-my-app -n flux-system
kubectl describe helmrepository -n flux-system

4. If the objects look right but nothing happens, check the controllers. Their logs name each object they reconcile.

bash
kubectl get deployments -n flux-system
kubectl logs -n flux-system deployment/source-controller --tail=100 | grep my-app
kubectl logs -n flux-system deployment/kustomize-controller --tail=100 | grep my-app
kubectl logs -n flux-system deployment/helm-controller --tail=100 | grep my-app

If the flux CLI is installed, flux get all -A and flux events -n flux-system show the same state in one view; they are optional, kubectl is enough.

5. Open the matching reference and follow its steps:

What you seeReference
A GitRepository, OCIRepository, HelmRepository or HelmChart not Ready; couldn't find remote ref, authentication required, invalid chart referencereferences/sources.md
A Kustomization not Ready: kustomization path not found, kustomize build failed, dependency ... is not ready, health check timeout, Source artifact not foundreferences/kustomizations.md
A HelmRelease not Ready: SourceNotReady, InstallFailed, UpgradeFailed, RetriesExceeded, driftreferences/helmreleases.md
Nothing happens at all, SUSPENDED True, objects on removed v1beta APIs, controllers downreferences/suspend-and-controllers.md

Read the results

What the common findings mean (Flux 2.9):

  • A Kustomization with Source artifact not found, retrying in 30s (reason ArtifactFailed): its source has no artifact yet. The cause is on the source; read it.
  • A GitRepository with failed to checkout and determine revision: unable to clone '<url>': couldn't find remote ref "refs/heads/<branch>" (reason GitOperationFailed, FetchFailed True): the branch in spec.ref does not exist. authentication required or repository not found mean credentials or the URL.
  • kustomization path not found: stat ... (reason ArtifactFailed): the source is fine, but spec.path names a folder the artifact does not have.
  • kustomize build failed: ... (reason BuildFailed): the folder exists, but kustomize cannot build it; the message says why.
  • A HelmRelease with HelmChart '<ns>/<name>' is not ready: ... (reason SourceNotReady): read the HelmChart. invalid chart reference: ... no '<chart>' chart with version matching '<version>' found (reason InvalidChartReference, Stalled True) means the repository has no such version; Flux will not retry until the spec changes.
  • Stalled True with RetriesExceeded on a HelmRelease: install or upgrade failed and the retries are used up (install retries default to 0). Flux waits for a spec change or a reset.
  • SUSPENDED True: Flux skips the object; its conditions are from the last run before it was suspended and can be stale.
  • A source that is Ready, with the new commit in status.artifact.revision, but the cluster unchanged: look at the Kustomization or HelmRelease that uses it, and its lastAppliedRevision.

State the cause in one sentence, then the evidence you saw (the condition reason and message, the spec field, the revision), then the proposed fix.

Proposed fix

Show each fix to the user before running it: what it changes and how to undo it. Asking Flux to reconcile now, resuming a suspended object and patching a Flux object's spec are reversible, so they go under "Ask first" and run only after the user says yes. Deleting Flux objects or the workloads they manage, changing credentials, and reinstalling Flux are never run by you: hand them to the user as proposed fixes.

The fix almost always belongs in Git. Flux objects are themselves usually applied by a parent Kustomization (often flux-system), which puts back the version in Git at its next run; a patch on the live object is then only a test. Say so, and propose the change in the repository. Write each undo with the values you found.

Point a Kustomization at the right folder, to test before fixing Git:

Ask first: the agent runs this only after the user approves it.

bash
kubectl patch kustomization my-app -n flux-system --type=merge -p '{"spec": {"path": "./kustomize"}}'
# Undo: kubectl patch kustomization my-app -n flux-system --type=merge -p '{"spec": {"path": "./kustomize/overlays/production"}}'

Ask Flux to reconcile an object now instead of waiting for its interval (use the current time as the value; any new value triggers a run):

Ask first: the agent runs this only after the user approves it.

bash
kubectl annotate --overwrite gitrepository my-app -n flux-system reconcile.fluxcd.io/requestedAt=2026-10-24T12:00:00Z
# Undo: nothing to undo; the annotation only asks for one reconciliation

Resume an object that was suspended (only once the reason for suspending it is gone):

Ask first: the agent runs this only after the user approves it.

bash
kubectl patch kustomization my-app -n flux-system --type=merge -p '{"spec": {"suspend": false}}'
# Undo: kubectl patch kustomization my-app -n flux-system --type=merge -p '{"spec": {"suspend": true}}'

Sources

Checked against the Flux 2.9 documentation and the controllers' source (flux2 v2.9.6, source-controller and kustomize-controller v1.9.6, helm-controller v1.6.5):

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI K8s Flux Troubleshooting làm được gì?

Dùng khi Flux không triển khai hoặc cập nhật được nội dung nào đó trên Kubernetes: GitRepository, OCIRepository hoặc HelmRepository không ở trạng thái Ready ("couldn't find remote ref", "authentication required"), Kustomization không ở trạng thái Ready ("kustomization path not found", "kustomize build failed", "dependency ... is not ready", hết thời gian chờ kiểm tra tình trạng), HelmRelease không ở trạng thái Ready (HelmChart "invalid chart reference", InstallFailed, UpgradeFailed, RetriesExceeded), thay đổi trong Git không bao giờ được áp dụng lên cluster hoặc các đối tượng Flux bị tạm ng...

Vì sao nên dùng K8s Flux Troubleshooting trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. K8s Flux Troubleshooting là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài K8s Flux Troubleshooting trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-flux-troubleshooting. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng K8s Flux Troubleshooting?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng K8s Flux Troubleshooting với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng K8s Flux Troubleshooting với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI K8s Flux Troubleshooting có miễn phí không?

Có. Kỹ năng này được k8s-servant phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇