1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Add flux logs command

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere
2021-03-08 09:35:09 +01:00
parent 0b6969537b
commit 6d2e34e9b2
4 changed files with 323 additions and 0 deletions

View File

@@ -85,6 +85,7 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way.
* [flux export](flux_export.md) - Export resources in YAML format
* [flux get](flux_get.md) - Get sources and resources
* [flux install](flux_install.md) - Install or upgrade Flux
* [flux logs](flux_logs.md) - Display formatted logs for toolkit components
* [flux reconcile](flux_reconcile.md) - Reconcile sources and resources
* [flux resume](flux_resume.md) - Resume suspended resources
* [flux suspend](flux_suspend.md) - Suspend resources

59
docs/cmd/flux_logs.md Normal file
View File

@@ -0,0 +1,59 @@
## flux logs
Display formatted logs for toolkit components
### Synopsis
The logs command displays formatted logs from various toolkit components.
```
flux logs [flags]
```
### Examples
```
# Get logs from toolkit components
flux logs
# Stream logs from toolkit components
flux logs --follow
# Get logs from toolkit components in a particular namespace
flux logs --flux-namespace my-namespace
# Get logs for a particular log level
flux logs --level=info
# Filter logs by kind, name, or namespace
flux logs --kind=kustomization --name podinfo --namespace default
```
### Options
```
-A, --all-namespaces displays logs for objects across all namespaces
--flux-namespace string the namespace where the Flux components are running. (default "flux-system")
-f, --follow Specifies if the logs should be streamed
-h, --help help for logs
--kind string displays errors of a particular toolkit kind e.g GitRepository
--level logLevel log level, available options are: (debug, info, error)
--name string specifies the name of the object logs to be displayed
--tail int lines of recent log file to display (default -1)
```
### 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