k8s-flux-troubleshooting
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.