flux-export
Export Flux resources as YAML
TLDR
SYNOPSIS
flux export kind [name] [options]
DESCRIPTION
flux export prints one or all Flux custom resources in a namespace as YAML on stdout. A name is required unless --all is set.Use it to capture live objects for a Git repository, to move them between clusters, or to inspect the spec Flux is reconciling. Credential Secrets are omitted unless --with-credentials is passed on a source that stores them.Short kind aliases such as `ks` for kustomization and `hr` for helmrelease are accepted.
PARAMETERS
--all
Select every resource of the given kind in the namespace.--with-credentials
Include credential Secrets when exporting a source (SSH key pair or basic auth).-n, --namespace ns
Namespace scope for the CLI request (default `flux-system`).--timeout duration
Timeout for the operation (default `5m0s`).--kubeconfig file
Path to the kubeconfig file.--context name
Kubeconfig context to use.
KINDS
kustomization
Export a Kustomization.helmrelease
Export a HelmRelease.source git, source helm, source oci, source bucket, source chart, source external
Export a GitRepository, HelmRepository, OCIRepository, Bucket, HelmChart, or ExternalArtifact.image policy, image repository, image update
Export ImagePolicy, ImageRepository, or ImageUpdateAutomation objects.alert, alert-provider, receiver
Export notification Alerts, Providers, and Receivers.artifact
Export artifact objects, including artifact generators.
INSTALL
CAVEATS
--with-credentials writes private keys and passwords to stdout. Redirect that output only to a protected file. Exported YAML is the live object, which can differ from the manifest stored in Git. Cluster access via kubectl is required.
SEE ALSO
flux(1), flux-create(1), flux-get(1), flux-build(1)
