kube icon indicating copy to clipboard operation
kube copied to clipboard

inconsistency with kubectl with invalid user

Open aviramha opened this issue 1 year ago • 4 comments

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

add in ~/.kube/config

users:
- name: testt
  user: 
    password: a
    username: a

and in the testt context:

- context:
    cluster: testt
    user: testt
  name: testt

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

Found this while trying to work around https://github.com/metalbear-co/mirrord/issues/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?

No, since https://github.com/kube-rs/kube/issues/1594 is more important to me, but decided to log this issue for common knowledge.

aviramha avatar Oct 08 '24 07:10 aviramha

https://github.com/kube-rs/kube/issues/1594

aviramha avatar Oct 08 '24 07:10 aviramha

presumably duplicate of #1594 ?

clux avatar Oct 09 '24 18:10 clux

looks like it, closing. please reopen if there's something missing

clux avatar Oct 09 '24 18:10 clux

Hey, it's not a duplicate - in this case it would still fail by supplying wrong auth while kubectl works somehow

aviramha avatar Oct 09 '24 18:10 aviramha