Skip to content

kube-rs can't use empty user like Go's kubectl can #1594

@aviramha

Description

@aviramha

Current and expected behavior

When using kube-rs over kubectl proxy kube-rs client doesn't work while kubectl does

kubectl config set-cluster testt --server=http://localhost:8001 --insecure-skip-tls-verify=true
kubectl config set-context testt --cluster=testt
kubectl config use-context testt

then run kubectl get pods (using kube-rs' kubectl example) and it will fail, while official binary works.

Error: Failed to infer configuration: failed to infer config: in-cluster: (failed to read an incluster environment variable: environment variable not found), kubeconfig: (failed to find named user: )

Caused by:
    0: failed to infer config: in-cluster: (failed to read an incluster environment variable: environment variable not found), kubeconfig: (failed to find named user: )
    1: failed to find named user: 

Related - metalbear-co/mirrord#2803

Possible solution

No response

Additional context

No response

Environment

doesn't matter

Configuration and features

No response

Affected crates

kube-client

Would you like to work on fixing this bug?

Yes

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