LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

flux-uninstall

Uninstall Flux components and custom resource definitions from a cluster

TLDR

Uninstall Flux from the default `flux-system` namespace
$ flux uninstall
copy
Uninstall without a confirmation prompt
$ flux uninstall --silent
copy
Uninstall from a specific namespace
$ flux uninstall --namespace infra
copy
Uninstall Flux but keep the namespace
$ flux uninstall --keep-namespace
copy
Print objects that would be deleted without changing the cluster
$ flux uninstall --dry-run
copy

SYNOPSIS

flux uninstall [options]

DESCRIPTION

flux uninstall removes Flux from a Kubernetes cluster. It deletes the Flux components in the target namespace, strips `toolkit.fluxcd.io` finalizers cluster-wide, deletes the Flux custom resource definitions, and (unless --keep-namespace is set) deletes the namespace.The command takes no positional arguments. The namespace defaults to `flux-system`. Unless --silent or --dry-run is set, it asks for confirmation. If Flux was installed by another manager, the prompt names that manager before proceeding.

PARAMETERS

-s, --silent

Delete components without asking for confirmation.
--keep-namespace
Skip namespace deletion.
--dry-run
Print the objects that would be deleted without applying changes.
-n, --namespace ns
Namespace that holds the Flux components (default `flux-system`).
--timeout duration
Timeout for the operation (default `5m0s`).
--kubeconfig file
Path to the kubeconfig file.
--context name
Kubeconfig context to use.

INSTALL

sudo apk add flux
copy
brew install flux
copy
nix profile install nixpkgs#flux
copy

CAVEATS

This is a destructive cluster operation. Custom resources of Flux kinds are removed with the CRDs. Workloads Flux previously applied are left in place unless those objects are also Flux CRDs. Cluster-admin access is typically required. Git still contains the bootstrap manifests unless they are deleted separately.

SEE ALSO

RESOURCES

Copied to clipboard
Kai