Jx: Instructions are incomplete and does not work

Created on 29 Sep 2019  路  3Comments  路  Source: jenkins-x/jx

Summary

I'm trying to run jx version from GCP CloudShell and get an error.

Steps to reproduce the behavior

  1. Load GCP CloudShell
  2. Download latest jx from github release
  3. Run jx version

Expected behavior

Returns the version of jx

Actual behavior

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

Jx version

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

Jenkins type

  • [ ] Serverless Jenkins X Pipelines (Tekton + Prow)
  • [ ] Classic Jenkins

I'm using your tutorial getting Jenkins X to install in GKE with terraform as shown here https://github.com/jenkins-x/jx-tutorial

Kubernetes cluster

Operating system / Environment

aredocs docs-needed kinbug prioritcritical

Most helpful comment

I think that the jx command currently doesn't work if not connected to a cluster. We should update the docs accordingly.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings