Skip to content

On requests to Kubernetes clusters with expired tokens a lot of errors are thrown #100

@Gerrit91

Description

@Gerrit91

When you access a cluster which has exec credentials using this CLI and the token is expired, an entire screen of errors gets thrown. Not only once:

   ERROR  
          
  Failed to get cluster credentials: unauthenticated: token has expired. The API token has expired at 2026-01-29      
  20:03:51 +0100 CET. Create a new API token or use the login command.                                                

E0203 16:30:35.960491  216203 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://<redacted>.metalstackcloud.io/api?timeout=32s\": getting credentials: exec: executable /home/gerrit/git/github.com/metal-stack-cloud/cli/bin/metal-linux-amd64 failed with exit code 1"
          
   ERROR  
          
  Failed to get cluster credentials: unauthenticated: token has expired. The API token has expired at 2026-01-29      
  20:03:51 +0100 CET. Create a new API token or use the login command.                                                

E0203 16:30:36.176912  216203 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://<redacted>.metalstackcloud.io/api?timeout=32s\": getting credentials: exec: executable /home/gerrit/git/github.com/metal-stack-cloud/cli/bin/metal-linux-amd64 failed with exit code 1"

+ more than 10 repititions

I would expect only a single error gets thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions