K9s leverages XDG to keep its configuration files under
$XDG_CONFIG_HOME/k9s. The default configuration will vary across operating system so be sure to read up on the default location if you choose not to set that environment variable. The main configuration file is named
config.yml and stores various K9s specific bits. This file
will be updated by k9s to store current view and namespaces information.
K9s CLI Configuration
# $XDG_CONFIG_HOME/k9s/config.yml k9s: # Represents ui poll intervals. Default 2secs refreshRate: 2 # Number of retries once the connection to the api-server is lost. Default 15. maxConnRetry: 5 # Enable mouse support. Default false enableMouse: true # Set to true to hide K9s header. Default false headless: false # Set to true to hide K9s crumbs. Default false crumbsless: false # Indicates whether modification commands like delete/kill/edit are disabled. Default is false readOnly: false # Toggles icons display as not all terminal support these chars. noIcons: false # Logs configuration logger: # Defines the number of lines to return. Default 100 tail: 200 # Defines the total number of log lines to allow in the view. Default 1000 buffer: 500 # Represents how far to go back in the log timeline in seconds. Setting to -1 will show all available logs. Default is 5mins. sinceSeconds: 300 # Go full screen while displaying logs. Default false fullScreenLogs: false # Toggles log line wrap. Default false textWrap: false # Toggles log line timestamp info. Default false showTime: false # Indicates the current Kube context. Defaults to current context currentContext: minikube # Indicates the current kube cluster. Defaults to current context cluster currentCluster: minikube # Persists per cluster preferences for favorite namespaces and view. clusters: cluster1: namespace: active: coolio favorites: - cassandra - default view: active: po featureGates: # Toggles NodeShell support. Allow K9s to shell into nodes if needed. Default false. nodeShell: false # Provide shell pod customization of feature gate is enabled shellPod: # The shell pod image to use. image: killerAdmin # The namespace to launch to shell pod into. namespace: fred # The resource limit to set on the shell pod. limits: cpu: 100m memory: 100Mi # The IP Address to use when launching a port-forward. portForwardAddress: 220.127.116.11 cluster2: namespace: active: all favorites: - all - kube-system - default view: active: dp
© 2020 Imhotep Software LLC. All materials licensed under Apache v2.0