I'm trying to run jx version from GCP CloudShell and get an error.
Returns the version of jx
Errors with:
james@cloudshell:~ (cf-sandbox)$ ./jx version
error: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
Latest from github 9/29/2019
The output of jx version is:
james@cloudshell:~ (cf-sandbox)$ ./jx version
error: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
I'm using your tutorial getting Jenkins X to install in GKE with terraform as shown here https://github.com/jenkins-x/jx-tutorial
I get the very same error:
~/jx-tutorial$ jx create quickstart
WARNING: WARNING: The current user cannot query secrets in the namespace default: Failed to create a Kubernetes client unable to lo
ad in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
WARNING: failed to find development namespace - unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SER
VICE_PORT must be defined
error: failed to load quickstarts: failed to load TeamSettings: failed to create the jx client: unable to load in-cluster configura
tion, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
I think that the jx command currently doesn't work if not connected to a cluster. We should update the docs accordingly.
Hi @ipv1337, jx needs to be installed on an existing Kubernetes cluster. The Getting Started docs have been clarified with this information.
Beyond that, there is a git conflict between the git version necessary for jx and the git version provided in the Cloud Shell environment. We have raised an issue with Cloud Shell requesting that they update the git version provided, but until that happens the Cloud Shell tutorials won't work. See Issue #5488. Until this is resolved, mention of the Cloud Shell tutorials should not appear in the docs.
Instead of the Cloud Shell tutorials, we suggest that you follow the Getting Started instructions here.
Most helpful comment
I think that the
jxcommand currently doesn't work if not connected to a cluster. We should update the docs accordingly.