Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashes on start #3052

Open
tcurdt opened this issue Jan 8, 2025 · 1 comment
Open

crashes on start #3052

tcurdt opened this issue Jan 8, 2025 · 1 comment

Comments

@tcurdt
Copy link

tcurdt commented Jan 8, 2025




Describe the bug

I am starting k9s and get a crash with exit 1

k9s
Error: exit status 1
Usage:
  k9s [flags]
  k9s [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  info        List K9s configurations info
  version     Print version/build info

Flags:
  -A, --all-namespaces                 Launch K9s in all namespaces
      --as string                      Username to impersonate for the operation
      --as-group stringArray           Group to impersonate for the operation
      --certificate-authority string   Path to a cert file for the certificate authority
      --client-certificate string      Path to a client certificate file for TLS
      --client-key string              Path to a client key file for TLS
      --cluster string                 The name of the kubeconfig cluster to use
  -c, --command string                 Overrides the default resource to load when the application launches
      --context string                 The name of the kubeconfig context to use
      --crumbsless                     Turn K9s crumbs off
      --headless                       Turn K9s header off
  -h, --help                           help for k9s
      --insecure-skip-tls-verify       If true, the server's caCertFile will not be checked for validity
      --kubeconfig string              Path to the kubeconfig file to use for CLI requests
      --logFile string                 Specify the log file (default "/home/ops/.local/state/k9s/k9s.log")
  -l, --logLevel string                Specify a log level (info, warn, debug, trace, error) (default "info")
      --logoless                       Turn K9s logo off
  -n, --namespace string               If present, the namespace scope for this CLI request
      --readonly                       Sets readOnly mode by overriding readOnly configuration setting
  -r, --refresh int                    Specify the default refresh rate as an integer (sec) (default 2)
      --request-timeout string         The length of time to wait before giving up on a single server request
      --screen-dump-dir string         Sets a path to a dir for a screen dumps
      --token string                   Bearer token for authentication to the API server
      --user string                    The name of the kubeconfig user to use
      --write                          Sets write mode by overriding the readOnly configuration setting

Use "k9s [command] --help" for more information about a command.

panic: exit status 1

goroutine 1 [running]:
github.com/derailed/k9s/cmd.Execute()
        github.com/derailed/k9s/cmd/root.go:72 +0x77
main.main()
        github.com/derailed/k9s/main.go:32 +0xf

To Reproduce
Steps to reproduce the behavior:

  1. install via nix stable
  2. run k9s

Expected behavior
It should not crash. (Used to work fine before)

Versions (please complete the following information):

  • OS: nixOS
  • K9s: 0.32.5
  • K8s: k3s version v1.30.4+k3s1 (98262b5d)
@tcurdt
Copy link
Author

tcurdt commented Jan 8, 2025

I found the issue. It's related the to TERM variable.
I recently switched to ghostty. When I switch ssh over to

  SetEnv TERM=xterm-256color

for the ssh connection k9s works again.

But it should not panic like this with a "wrong" TERM setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant