Skip to content

python kubeconfig loading doesn't match kubectl config loading... #445

@brendandburns

Description

@brendandburns

I had a .kube/config file with duplicate clusters with the same name (but different information) in the config file, the three different entries each pointed to different clusters, two were dead, but one was alive (I had be repeatedly creating and deleting clusters)

kubectl command line happened to chose the working one and worked correctly.

python client library chose the first one in the file (which wasn't working) and failed.

This lead to a very confused experience until I figured out what was going on.

It will be difficult to emulate the kubectl parsing exactly, but we should detect duplicate entries and throw an exception. (and I would argue that kubectl probably should too)

This actually probably applies to all client libraries in different languages.

@mbohlool

Metadata

Metadata

Assignees

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