Closed lbolla closed 2 years ago
Same issue here,
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: REDACTED
server: https://10.10.10.10:6443
name: itpv-1
contexts:
- context:
cluster: itpv-1
user: admin
name: admin@itpv-1
current-context: admin@itpv-1
kind: Config
preferences: {}
users:
- name: admin
user:
client-certificate-data: REDACTED
client-key-data: REDACTED`
my issue:
[Warning] Couldn't find/load context gke-a_cluster-1, now no current context. Error: Failed to get config: Invalid context gke_inblockchain-back-garden_asia-east1-a_cluster-1. Each user must have either a token, a username AND password, or a client-certificate AND a client-key.
same here two local on prem. clusters kubectl kube-shell etc are working just fine
kubectl config view
apiVersion: v1
clusters:
- cluster:
server: ""
name: ""
- cluster:
certificate-authority-data: REDACTED
server: https://10.66.150.42:6443
name: devk8s
- cluster:
certificate-authority-data: REDACTED
server: https://10.55.11.104:6443
name: sandbox
contexts:
- context:
cluster: sandbox
user: superadmin
name: default
- context:
cluster: devk8s
user: admin@devk8s
name: mydev
current-context: mydev
kind: Config
preferences: {}
users:
- name: admin@devk8s
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
- name: superadmin
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
[none] [none] [none] > contexts
default
mydev
[none] [none] [none] > context mydev
Private key data was invalid: ()
[Warning] Couldn't find/load context mydev, now no current context. Error: Failed to get config: Invalid certificate or key data for context: mydev
[none] [none] [none] >
This should be fixed by the new reqwest client. Please test and open a new issue if you have any trouble.
When using
kubectl config use-context
all works fine.