Stern --help
Jump to navigation
Jump to search
Tail multiple pods and containers from Kubernetes Usage: stern pod-query [flags] Flags: -A, --all-namespaces If present, tail across all namespaces. A specific namespace is ignored even if specified with --namespace. --color string Force set color output. 'auto': colorize if tty attached, 'always': always colorize, 'never': never colorize. (default "auto") --completion string Output stern command-line completion code for the specified shell. Can be 'bash', 'zsh' or 'fish'. -c, --container string Container name when multiple containers in pod. (regular expression) (default ".*") --container-state strings Tail containers with state in running, waiting or terminated. To specify multiple states, repeat this or set comma-separated value. (default [running]) --context string Kubernetes context to use. Default to current context configured in kubeconfig. --ephemeral-containers Include or exclude ephemeral containers. (default true) -e, --exclude strings Log lines to exclude. (regular expression) -E, --exclude-container string Container name to exclude when multiple containers in pod. (regular expression) --exclude-pod string Pod name to exclude. (regular expression) --field-selector string Selector (field query) to filter on. If present, default to ".*" for the pod-query. -h, --help help for stern -i, --include strings Log lines to include. (regular expression) --init-containers Include or exclude init containers. (default true) --kubeconfig string Path to kubeconfig file to use. Default to KUBECONFIG variable then ~/.kube/config path. -n, --namespace strings Kubernetes namespace to use. Default to namespace configured in kubernetes context. To specify multiple namespaces, repeat this or set comma-separated value. -o, --output string Specify predefined template. Currently support: [default, raw, json] (default "default") -p, --prompt Toggle interactive prompt for selecting 'app.kubernetes.io/instance' label values. -l, --selector string Selector (label query) to filter on. If present, default to ".*" for the pod-query. -s, --since duration Return logs newer than a relative duration like 5s, 2m, or 3h. (default 48h0m0s) --tail int The number of lines from the end of the logs to show. Defaults to -1, showing all logs. (default -1) --template string Template to use for log lines, leave empty to use --output flag. -t, --timestamps Print timestamps. --timezone string Set timestamps to specific timezone. (default "Local") -v, --version Print the version and exit.
See also
Advertising: