fluxcd-flux2/docs/cmd/flux_uninstall.md
Stefan Prodan f5ae8f44b4
Refactor flux uninstall command
- deletes Flux components (deployments and services)
- deletes Flux RBAC (service accounts, cluster roles and cluster role bindings)
- removes the Kubernetes finalizers from Flux custom resources
- deletes Flux custom resource definitions and custom resources
- deletes the namespace where Flux was installed
- preserves the Kubernetes objects and Helm releases that were reconciled on the cluster by Flux

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-12 14:30:50 +02:00

45 lines
1.1 KiB
Markdown

## flux uninstall
Uninstall Flux and its custom resource definitions
### Synopsis
The uninstall command removes the Flux components and the toolkit.fluxcd.io resources from the cluster.
```
flux uninstall [flags]
```
### Examples
```
# Uninstall Flux components, its custom resources and namespace
flux uninstall --namespace=flux-system
# Uninstall Flux but keep the namespace
flux uninstall --namespace=infra --keep-namespace=true
```
### Options
```
-h, --help help for uninstall
--keep-namespace skip namespace deletion
-s, --silent delete components without asking for confirmation
```
### Options inherited from parent commands
```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
```
### SEE ALSO
* [flux](flux.md) - Command line utility for assembling Kubernetes CD pipelines