bug: Enhance the error message when an admin.kubeconfig already exists, but is corrupt #2295
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
Describe the bug
Recently I was performing a kcp startup, which failed with the following errors:
Later, I determined the issue was due to a pre-existing corrupt kubeconfig (did not have any token or context details for shard-admin user) at
.kcp/admin.kubeconfig
. After cleaning up .kcp, I re-rango run ./cmd/kcp start
, and it progressed well!Would it be feasible to enhance the error message, when the
admin.kubeconfig
file already exists but does not have token details of the shard-admin user, rather than just stating that "it couldn't be created with empty token"? Let me know your thoughts!If this seems like a useful change, I would like to work on it. Thanks!
Steps To Reproduce
go run ./cmd/kcp start
Expected Behaviour
A clearer message that indicates the missing context & token details from the existing kubeconfig.
Additional Context
No response
The text was updated successfully, but these errors were encountered: