Skip to content

Invoking K9s ends in panic #2454

@hsingh131

Description

@hsingh131




Describe the bug
The bug occurs when k9s is invoked in user shell

To Reproduce
Steps to reproduce the behavior:

  1. Have M1 Macbook
  2. Run aws eks update-kubeconfig --name=clustername --region=us-east-1.aws --profile=your-profile
  3. Run k9s in shell returns
k9s
Error: the server has asked for the client to provide credentials
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 "/Users/Harshit.Singh/Library/Application Support/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: the server has asked for the client to provide credentials

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

Historical Documents
When applicable please include any supporting artifacts: k9s debug logs, configurations, resource manifests, ...

Expected behavior
On running the k9s command a new shell with all cluster details should open up allowing user to switch between variety of k8s objects

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: v14.2.1
  • K9s: v0.31.2]
  • K8s: v.1.25

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions