Description
Describe the bug
Recently I was performing a kcp startup, which failed with the following errors:
cannot create the 'admin.kubeconfig` file with an empty token for the shard-admin user
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-ran go 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
- Remove the context and token details for shard-admin user in the .kcp/admin.kubeconfig.
- Build and start the kcp:
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
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity