Jx: Jx install Kubernates Error

Created on 4 Nov 2018  路  9Comments  路  Source: jenkins-x/jx

Summary

Steps to reproduce the behavior

Jx version

The output of jx version is:

NAME               VERSION
jx                 1.3.508
jenkins x platform 0.0.2806
Kubernetes cluster v1.9.4
kubectl            v1.9.4
helm client        v2.8.1+g6af75a8
helm server        v2.8.1+g6af75a8
git                git version 2.19.1.windows.1

Kubernetes cluster

What kind of Kubernetes cluster are you using & how did you create it?

Operating system / Environment

Expected behavior

Select Jenkins installation type: Static Master Jenkins
Installing Jenkins X platform helm chart from: C:\Users\lubinsu.jx\cloud-environments\env-kubernetes
Installing jx into namespace jx
Waiting for tiller pod to be ready, service account name is tiller, namespace is jx, tiller namespace is kube-system
Waiting for cluster role binding to be defined, named tiller-role-binding in namespace jx
tiller cluster role defined: cluster-admin in namespace jx
tiller pod running
error: failed to install/upgrade the jenkins-x platform chart: failed to run 'helm upgrade --namespace jx --install --timeout 6000 --version 0.0.2806 --values C:\Users\lubinsu.jx\cloud-environments\env-kubernetes\myvalues.yaml --values C:\Users\lubinsu.jx\cloud-environments\env-kubernetes\secrets.yaml --values C:\Users\lubinsu.jx\gitSecrets.yaml --values C:\Users\lubinsu.jx\adminSecrets.yaml --values C:\Users\lubinsu.jx\extraValues.yaml jenkins-x jenkins-x/jenkins-x-platform' command in directory 'C:\Users\lubinsu.jx\cloud-environments\env-kubernetes', output: 'Error: UPGRADE FAILED: "jenkins-x" has no deployed releases': exit status 1
PS C:\Windows\system32> jx version
Using helmBinary helm with feature flag: none

Actual behavior

areinstall arewindows kinbug prioritawaiting-more-evidence

All 9 comments

Make sure your helm is properly installed and updated.

helm init
helm repo update
helm init 鈥攗pgrade

Try running those commands in order

I also had this issue:

? Select Jenkins installation type: Serverless Jenkins
Installing Jenkins X platform helm chart from: /Users/jesse/.jx/cloud-environments/env-aws
Installing Prow into namespace jx
Updating Helm repository...
Helm repository update done.
Installing knative into namespace jx
Updating Helm repository...
Helm repository update done.
Installing BuildTemplates into namespace jx
Updating Helm repository...
Helm repository update done.
Installing jx into namespace jx
Waiting for tiller pod to be ready, service account name is tiller, namespace is jx, tiller namespace is kube-system
Waiting for cluster role binding to be defined, named tiller-role-binding in namespace jx
 tiller cluster role defined: cluster-admin in namespace jx
tiller pod running
error: failed to install/upgrade the jenkins-x platform chart: failed to run 'helm upgrade --namespace jx --install --timeout 6000 --version 0.0.2902 --values /Users/jesse/.jx/cloud-environments/env-aws/myvalues.yaml --values /Users/jesse/.jx/cloud-environments/env-aws/secrets.yaml --values /Users/jesse/.jx/gitSecrets.yaml --values /Users/jesse/.jx/adminSecrets.yaml --values /Users/jesse/.jx/extraValues.yaml jenkins-x jenkins-x/jenkins-x-platform' command in directory '/Users/jesse/.jx/cloud-environments/env-aws', output: 'Error: UPGRADE FAILED: "jenkins-x" has no deployed releases': exit status 1

I tried your above helm update fix, but I still get:

error: failed to install/upgrade the jenkins-x platform chart: failed to run 'helm upgrade --namespace jx --install --timeout 6000 --version 0.0.2902 --values /Users/jesse/.jx/cloud-environments/env-aws/myvalues.yaml --values /Users/jesse/.jx/cloud-environments/env-aws/secrets.yaml --values /Users/jesse/.jx/gitSecrets.yaml --values /Users/jesse/.jx/adminSecrets.yaml --values /Users/jesse/.jx/extraValues.yaml jenkins-x jenkins-x/jenkins-x-platform' command in directory '/Users/jesse/.jx/cloud-environments/env-aws', output: 'Error: UPGRADE FAILED: "jenkins-x" has no deployed releases': exit status 1

Versions of things
$ jx version
Using helmBinary helm with feature flag: none
The above version command hangs.

$ helm version
Client: &version.Version{SemVer:"v2.10.0", GitCommit:"9ad53aac42165a5fadc6c87be0dea6b115f93090", GitTreeState:"clean"}

The exact command I ran
jx install --no-default-environments=true --provider='aws' --git-provider-url='https://bitbucket.org

Tried running the steps in #1334 before upgrading helm, and it still didn't work.

$ helm ls --all jenkins-x
NAME        REVISION    UPDATED                     STATUS  CHART                       APP VERSION NAMESPACE
jenkins-x   1           Mon Nov 19 16:12:25 2018    FAILED  jenkins-x-platform-0.0.2902             jx
$ kubectl describe jobs.batch --namespace jx
Name:           cleanup
Namespace:      jx
Selector:       controller-uid=<redacted>
Labels:         chart=cleanup-2.3.82
                component=jenkins-x-cleanup
                heritage=Tiller
                release=jenkins-x
Annotations:    helm.sh/hook: pre-delete
                helm.sh/hook-delete-policy: hook-succeeded
Parallelism:    1
Completions:    1
Start Time:     Mon, 19 Nov 2018 20:24:15 -0800
Pods Statuses:  0 Running / 0 Succeeded / 5 Failed
Pod Template:
  Labels:           chart=cleanup-2.3.82
                    controller-uid=<redacted>
                    heritage=Tiller
                    job-name=cleanup
                    release=jenkins-x
  Service Account:  cleanup
  Containers:
   cleanup:
    Image:      jenkinsxio/exposecontroller:2.3.82
    Port:       <none>
    Host Port:  <none>
    Command:
      /exposecontroller
    Args:
      --cleanup
    Environment:
      KUBERNETES_NAMESPACE:   (v1:metadata.namespace)
    Mounts:                  <none>
  Volumes:                   <none>
Events:                      <none>

After creating the account, it looks like the cleanup job finished up, but the actual helm command that jx install is running keeps returning that same error posted above.

Error: UPGRADE FAILED: "jenkins-x" has no deployed releases is a fairly common issue with Helm. Once you've attempted an install that fails, it won't let you do a helm upgrade --install because it can see that the chart is installed but there are no releases for it to upgrade. Do a helm delete --purge before you try reinstalling.

@davidcurrie I tried that, but I was left with a bunch of pods trying to do the following:

$ kubectl get pods
NAME                                READY   STATUS             RESTARTS   AGE
build-controller-56f586bcb8-z5rvf   1/1     Running            0          8h
cleanup-4khxq                       0/1     Error              0          4h24m
cleanup-jq7d4                       0/1     Error              0          4h22m
cleanup-rn5s2                       0/1     Error              0          4h24m
cleanup-vkfbc                       0/1     Error              0          4h24m
cleanup-wnwfj                       0/1     Error              0          4h24m
deck-5cb4bb88cc-494wt               1/1     Running            0          8h
deck-5cb4bb88cc-w4jm5               1/1     Running            0          8h
hook-69bc88c5b6-btm9v               0/1     CrashLoopBackOff   106        8h
hook-69bc88c5b6-drdk8               0/1     CrashLoopBackOff   106        8h
horologium-7cdc6c7fdd-27dbj         1/1     Running            0          8h
plank-c48666dc4-wrlpz               1/1     Running            0          8h
prow-build-5998679488-gmcpk         1/1     Running            0          8h
sinker-6d5df5cf89-zzwk7             1/1     Running            0          8h
tide-6b4969d5db-whctn               0/1     CrashLoopBackOff   106        8h

Tried to clean them up, and it was giving me problems, so I just blew away the entire namespace and started fresh:

Creating Secret jx-install-config in namespace jx
Generated helm values /Users/jesse/.jx/extraValues.yaml
? Select Jenkins installation type: Serverless Jenkins
Installing Jenkins X platform helm chart from: /Users/jesse/.jx/cloud-environments/env-aws
Adding missing Helm repo: jenkins-x http://chartmuseum.jenkins-x.io
Successfully added Helm repository jenkins-x.
generating Prow config, using Knative BuildTemplate jenkins-base
generating Prow config, using Knative BuildTemplate jenkins-base
Installing Prow into namespace jx
Updating Helm repository...
Helm repository update done.
Installing knative into namespace jx
Updating Helm repository...
Helm repository update done.
Installing BuildTemplates into namespace jx
Updating Helm repository...
Helm repository update done.
Installing jx into namespace jx
Waiting for tiller pod to be ready, service account name is tiller, namespace is jx, tiller namespace is kube-system
Waiting for cluster role binding to be defined, named tiller-role-binding in namespace jx
 tiller cluster role defined: cluster-admin in namespace jx
tiller pod running
Adding values file /Users/jesse/.jx/cloud-environments/env-aws/myvalues.yaml
Adding values file /Users/jesse/.jx/gitSecrets.yaml
Adding values file /Users/jesse/.jx/adminSecrets.yaml
Adding values file /Users/jesse/.jx/extraValues.yaml
Adding values file /Users/jesse/.jx/cloud-environments/env-aws/secrets.yaml
error: failed to install/upgrade the jenkins-x platform chart: failed to run 'helm upgrade --namespace jx --install --timeout 6000 --version 0.0.2902 --values /Users/jesse/.jx/cloud-environments/env-aws/myvalues.yaml --values /Users/jesse/.jx/gitSecrets.yaml --values /Users/jesse/.jx/adminSecrets.yaml --values /Users/jesse/.jx/extraValues.yaml --values /Users/jesse/.jx/cloud-environments/env-aws/secrets.yaml jenkins-x jenkins-x/jenkins-x-platform' command in directory '/Users/jesse/.jx/cloud-environments/env-aws', output: 'Error: UPGRADE FAILED: "jenkins-x" has no deployed releases': exit status 1

So I'm still getting issues above and I'm unsure why:

$ jx version
Updated the team settings in namespace jx
Updated the team settings in namespace jx
NAME               VERSION
jx                 1.3.574
jenkins x platform 0.0.2902
Kubernetes cluster v1.12.0
kubectl            v1.12.2
helm client        v2.10.0+g9ad53aa
helm server        v2.10.0+g9ad53aa
git                git version 2.17.1 (Apple Git-112)

Unfortunately, as tiller is in kube-system, deleting the jx namespace isn't going to clean up the failed Helm releases so you'd still need both. I'm sure @jstrachan would recommend that you install with the --no-tiller option anyway which would bypass this problem.

@tangdu Is this sill an issue with the latest version?

am testing JenkinsX in DO/k8s stuff and still a issue!

@tangdu I am closing this issue. I seems to be related to helm configuration. Fell free to open another issue if you are sill facing this problem. Thanks

Was this page helpful?
0 / 5 - 0 ratings