-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: kflex
fails when kflex-initial-ctx-name
is invalid
#202
Comments
I find that with KubeFlex 0.6.3, if the extension stores the name of a context that exists but is not working, this is an unrecoverable state: no mspreitz@mjs13 kubestellar % kubectl config use-context kind-kubeflex
Switched to context "kind-kubeflex".
mspreitz@mjs13 kubestellar % kflex ctx wds1
kubeconfig context wds1 not found (context wds1 not found), trying to load from server...
◐ Switching to context wds1...Error getting kf client: error creating NewDiscoveryRESTMapper: Get "https://c115-e.us-south.containers.cloud.ibm.com:30486/api": dial tcp 50.22.129.34:30486: connect: connection refused
mspreitz@mjs13 kubestellar % kflex ctx
✔ Checking for saved hosting cluster context...
✔ Switching to hosting cluster context...
mspreitz@mjs13 kubestellar % kubectl config current-context
kscore-stage
mspreitz@mjs13 kubestellar % yq .preferences ${KUBECONFIG:-$HOME/.kube/config}
extensions:
- extension:
data:
kflex-initial-ctx-name: kscore-stage
metadata:
creationTimestamp: null
name: kflex-config-extension-name
name: kflex-config-extension-name |
Note also that https://docs.kubestellar.io/release-0.24.0/direct/get-started/ does not invoke |
Describe the bug
kflex create cp1
fails when the kubeconfig contains akflex-initial-ctx-name
pointing to an invalid contextsSteps To Reproduce
the
kubeconfig
still contains something like:Then
Expected Behavior
kflex
should check on the validity ofkflex-initial-ctx-name
before using it.If it is not valid, ignore it, assume that it was not enetered before
Additional Context
No response
The text was updated successfully, but these errors were encountered: