Skip to content

Configuration

The kubetail CLI tool can be configured using a local config file. If a config file is not found, Kubetail will use the defaults shown below. The file supports YAML, JSON, and TOML formats and values can reference environment variables using ${VARIABLE_NAME} syntax.


The default config file path is ~/.kubetail/config.yaml. You can initialize the config by placing a file in the default location or by using the CLI config init command to do it for you:

Terminal window
kubetail config init

Everytime you run a kubetail command, it will automatically look for a config file in the default location. You can specify a different path with the global --config flag:

Terminal window
kubetail serve --config /path/to/config.yaml

## Kubetail CLI Configuration File
#
# This file defines the behavior for the kubetail CLI tool,
# including logs command defaults and dashboard server settings.
#
## version ##
#
# Schema version for the configuration file
#
version: 1
## general ##
#
general:
## kubeconfig ##
#
# Path to the kubeconfig file to use for CLI requests.
# If empty, the default path (~/.kube/config) or KUBECONFIG env var is used.
#
# Default value: ""
#
kubeconfig: ""
## commands ##
#
commands:
## logs ##
#
# Settings specific to the 'logs' subcommand
#
logs:
## kube-context ##
#
# The specific Kubernetes context to use.
# If empty, the current active context is used.
#
# Default value: ""
#
kube-context: ""
## head ##
#
# The number of lines to show from the beginning of the log buffer
#
# Default value: 10
#
head: 10
## tail ##
#
# The number of lines to show from the end of the log buffer
#
# Default value: 10
#
tail: 10
## columns ##
#
# Full set of output columns for 'logs' records.
# Allowed values: timestamp,dot,node,region,zone,os,arch,namespace,pod,container
#
# Default value: ["timestamp", "dot"]
#
columns:
- timestamp
- dot
## serve ##
#
# Settings for the dashboard server
#
serve:
## host ##
#
# The network interface the server should bind to.
#
# Default value: localhost
#
host: localhost
## port ##
#
# The TCP port the server will listen on.
#
# Default value: 7500
#
port: 7500
## skip-open ##
#
# If true, the CLI will not automatically open the browser
# when the server starts.
#
# Default value: false
#
skip-open: false