Open rhuss opened 8 years ago
Hmm docker-env shouldn't ever require logging in...
$ ~/fabric8/bin/gofabric8 docker-env
Please enter Username: admin
Please enter Password: admin
Unable to find any nodes: User "system:anonymous" cannot list all nodes in the cluster
docker-env is only available to run on clusters of 1 node%
I'll have a look shortly, from memory I check the node name using the k client to see if it's minishift or minikube. If it's an openshift cluster and the login token has expired then a user would normally need to log in again before interacting with the API server. Anyway, I'll have a proper look when I'm at my laptop and have a think.
@rhuss I'll take a stab checking the current ~/.kube/config
context to tell whether we're minishift or minikube so that we dont need to use the kubernetes go client, which is the things that's throwing that error.
hopefully this will be resolved with the latest release https://github.com/fabric8io/gofabric8/releases/tag/v0.4.67 following the PR https://github.com/fabric8io/gofabric8/pull/181 - I wasn't ever prompted for a username / password during my recent working so lets keep this issue open until it'c confirmed fixed.
When not logged in into k8s / minishift,
gofabric8 docker-env
will ask for a password. This makes problems when used in startup scripts or from fabric8-maven-plugin.It would be better, that when not logged in, simply nothing will be printed out. Or only a warning, but nothing blocking.