You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`--config` | `~/.config/stern/config.yaml` | Path to the stern config file
78
78
`--container`, `-c` | `.*` | Container name when multiple containers in pod. (regular expression)
79
79
`--container-state` | `all` | Tail containers with state in running, waiting, terminated, or all. 'all' matches all container states. To specify multiple states, repeat this or set comma-separated value.
80
-
`--context` | | Kubernetes context to use. Default to current context configured in kubeconfig.
80
+
`--context` | | The name of the kubeconfig context to use
81
81
`--ephemeral-containers` | `true` | Include or exclude ephemeral containers.
`--init-containers` | `true` | Include or exclude init containers.
88
-
`--kubeconfig` | | Path to kubeconfig file to use. Default to KUBECONFIG variable then ~/.kube/config path.
88
+
`--kubeconfig` | | Path to the kubeconfig file to use for CLI requests.
89
89
`--max-log-requests` | `-1` | Maximum number of concurrent logs to request. Defaults to 50, but 5 when specifying --no-follow
90
90
`--namespace`, `-n` | | Kubernetes namespace to use. Default to namespace configured in kubernetes context. To specify multiple namespaces, repeat this or set comma-separated value.
91
91
`--no-follow` | `false` | Exit when all logs have been shown.
fs.BoolVarP(&o.allNamespaces, "all-namespaces", "A", o.allNamespaces, "If present, tail across all namespaces. A specific namespace is ignored even if specified with --namespace.")
355
385
fs.StringVar(&o.color, "color", o.color, "Force set color output. 'auto': colorize if tty attached, 'always': always colorize, 'never': never colorize.")
356
386
fs.StringVar(&o.completion, "completion", o.completion, "Output stern command-line completion code for the specified shell. Can be 'bash', 'zsh' or 'fish'.")
357
387
fs.StringVarP(&o.container, "container", "c", o.container, "Container name when multiple containers in pod. (regular expression)")
358
388
fs.StringSliceVar(&o.containerStates, "container-state", o.containerStates, "Tail containers with state in running, waiting, terminated, or all. 'all' matches all container states. To specify multiple states, repeat this or set comma-separated value.")
359
-
fs.StringVar(&o.context, "context", o.context, "Kubernetes context to use. Default to current context configured in kubeconfig.")
360
389
fs.StringArrayVarP(&o.exclude, "exclude", "e", o.exclude, "Log lines to exclude. (regular expression)")
361
390
fs.StringArrayVarP(&o.excludeContainer, "exclude-container", "E", o.excludeContainer, "Container name to exclude when multiple containers in pod. (regular expression)")
362
391
fs.StringArrayVar(&o.excludePod, "exclude-pod", o.excludePod, "Pod name to exclude. (regular expression)")
363
392
fs.BoolVar(&o.noFollow, "no-follow", o.noFollow, "Exit when all logs have been shown.")
364
393
fs.StringArrayVarP(&o.include, "include", "i", o.include, "Log lines to include. (regular expression)")
365
394
fs.BoolVar(&o.initContainers, "init-containers", o.initContainers, "Include or exclude init containers.")
366
395
fs.BoolVar(&o.ephemeralContainers, "ephemeral-containers", o.ephemeralContainers, "Include or exclude ephemeral containers.")
367
-
fs.StringVar(&o.kubeConfig, "kubeconfig", o.kubeConfig, "Path to kubeconfig file to use. Default to KUBECONFIG variable then ~/.kube/config path.")
368
-
fs.StringVar(&o.kubeConfig, "kube-config", o.kubeConfig, "Path to kubeconfig file to use.")
fs.StringSliceVarP(&o.namespaces, "namespace", "n", o.namespaces, "Kubernetes namespace to use. Default to namespace configured in kubernetes context. To specify multiple namespaces, repeat this or set comma-separated value.")
371
397
fs.StringVar(&o.node, "node", o.node, "Node name to filter on.")
372
398
fs.IntVar(&o.maxLogRequests, "max-log-requests", o.maxLogRequests, "Maximum number of concurrent logs to request. Defaults to 50, but 5 when specifying --no-follow")
@@ -384,10 +410,39 @@ func (o *options) AddFlags(fs *pflag.FlagSet) {
384
410
fs.StringVar(&o.configFilePath, "config", o.configFilePath, "Path to the stern config file")
385
411
fs.IntVar(&o.verbosity, "verbosity", o.verbosity, "Number of the log level verbosity")
386
412
fs.BoolVarP(&o.version, "version", "v", o.version, "Print the version and exit.")
413
+
fs.BoolVar(&o.showHiddenOptions, "show-hidden-options", o.showHiddenOptions, "Print a list of hidden options.")
0 commit comments