<p>I am stuck with a helm install of jenkins </p>

<p>:( </p>

<p>please help!</p>

<p>I have predefined a storage class via:</p>

<pre><code>$ kubectl apply -f generic-storage-class.yaml 
</code></pre>

<p>with generic-storage-class.yaml:</p>

<pre><code>kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: generic
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp2
  zones: us-east-1a, us-east-1b, us-east-1c
  fsType: ext4
</code></pre>

<p>I then define a PVC via:</p>

<pre><code>$ kubectl apply -f jenkins-pvc.yaml
</code></pre>

<p>with jenkins-pvc.yaml:</p>

<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jenkins-pvc
  namespace: jenkins-project
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
</code></pre>

<p>I can then see the PVC go into the BOUND status:</p>

<pre><code>$ kubectl get pvc --all-namespaces
NAMESPACE         NAME               STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
jenkins-project   jenkins-pvc        Bound    pvc-a173294f-7cea-11e9-a90f-161c7e8a0754   20Gi       RWO            gp2            27m
</code></pre>

<p>But when I try to Helm install jenkins via:</p>

<pre><code>$ helm install --name jenkins \
--set persistence.existingClaim=jenkins-pvc \
stable/jenkins --namespace jenkins-project
</code></pre>

<p>I get this output:</p>

<pre><code>NAME:   jenkins
LAST DEPLOYED: Wed May 22 17:07:44 2019
NAMESPACE: jenkins-project
STATUS: DEPLOYED

RESOURCES:
==&gt; v1/ConfigMap
NAME           DATA  AGE
jenkins        5     0s
jenkins-tests  1     0s

==&gt; v1/Deployment
NAME     READY  UP-TO-DATE  AVAILABLE  AGE
jenkins  0/1    1           0          0s

==&gt; v1/PersistentVolumeClaim
NAME     STATUS   VOLUME  CAPACITY  ACCESS MODES  STORAGECLASS  AGE
jenkins  Pending  gp2     0s

==&gt; v1/Pod(related)
NAME                      READY  STATUS   RESTARTS  AGE
jenkins-6c9f9f5478-czdbh  0/1    Pending  0         0s

==&gt; v1/Secret
NAME     TYPE    DATA  AGE
jenkins  Opaque  2     0s

==&gt; v1/Service
NAME           TYPE          CLUSTER-IP      EXTERNAL-IP  PORT(S)         AGE
jenkins        LoadBalancer  10.100.200.27   &lt;pending&gt;    8080:31157/TCP  0s
jenkins-agent  ClusterIP     10.100.221.179  &lt;none&gt;       50000/TCP       0s


NOTES:
1. Get your 'admin' user password by running:
  printf $(kubectl get secret --namespace jenkins-project jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo
2. Get the Jenkins URL to visit by running these commands in the same shell:
  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
        You can watch the status of by running 'kubectl get svc --namespace jenkins-project -w jenkins'
  export SERVICE_IP=$(kubectl get svc --namespace jenkins-project jenkins --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
  echo http://$SERVICE_IP:8080/login

3. Login with the password from step 1 and the username: admin


For more information on running Jenkins on Kubernetes, visit:
https://cloud.google.com/solutions/jenkins-on-container-engine
</code></pre>

<p>where I see helm creating a new PersistentVolumeClaim called jenkins.</p>

<p>How come helm did not use the "exsistingClaim"</p>

<p>I see this as the only helm values for the jenkins release</p>

<pre><code>$ helm get values jenkins
persistence:
  existingClaim: jenkins-pvc
</code></pre>

<p>and indeed it has just made its own PVC instead of using the pre-created one.</p>

<pre><code>kubectl get pvc --all-namespaces
NAMESPACE         NAME               STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
jenkins-project   jenkins            Bound    pvc-a9caa3ba-7cf1-11e9-a90f-161c7e8a0754   8Gi        RWO            gp2            6m11s
jenkins-project   jenkins-pvc        Bound    pvc-a173294f-7cea-11e9-a90f-161c7e8a0754   20Gi       RWO            gp2            56m
</code></pre>

<p>I feel like I am close but missing something basic. Any ideas?</p>

<p>So per Matthew L Daniel's comment I ran <code>helm repo update</code> and then re-ran the helm install command. This time it did not re-create the PVC but instead used the pre-made one. </p>

<p>My previous jenkins chart version was "jenkins-0.35.0"</p>

<p>For anyone wondering what the deployment looked like:</p>

<pre><code>Name:               jenkins
Namespace:          jenkins-project
CreationTimestamp:  Wed, 22 May 2019 22:03:33 -0700
Labels:             app.kubernetes.io/component=jenkins-master
                    app.kubernetes.io/instance=jenkins
                    app.kubernetes.io/managed-by=Tiller
                    app.kubernetes.io/name=jenkins
                    helm.sh/chart=jenkins-1.1.21
Annotations:        deployment.kubernetes.io/revision: 1
Selector:           app.kubernetes.io/component=jenkins-master,app.kubernetes.io/instance=jenkins
Replicas:           1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType:       Recreate
MinReadySeconds:    0
Pod Template:
  Labels:           app.kubernetes.io/component=jenkins-master
                    app.kubernetes.io/instance=jenkins
                    app.kubernetes.io/managed-by=Tiller
                    app.kubernetes.io/name=jenkins
                    helm.sh/chart=jenkins-1.1.21
  Annotations:      checksum/config: 867177d7ed5c3002201650b63dad00de7eb1e45a6622e543b80fae1f674a99cb
  Service Account:  jenkins
  Init Containers:
   copy-default-config:
    Image:      jenkins/jenkins:lts
    Port:       &lt;none&gt;
    Host Port:  &lt;none&gt;
    Command:
      sh
      /var/jenkins_config/apply_config.sh
    Limits:
      cpu:     2
      memory:  4Gi
    Requests:
      cpu:     50m
      memory:  256Mi
    Environment:
      ADMIN_PASSWORD:  &lt;set to the key 'jenkins-admin-password' in secret 'jenkins'&gt;  Optional: false
      ADMIN_USER:      &lt;set to the key 'jenkins-admin-user' in secret 'jenkins'&gt;      Optional: false
    Mounts:
      /tmp from tmp (rw)
      /usr/share/jenkins/ref/plugins from plugins (rw)
      /usr/share/jenkins/ref/secrets/ from secrets-dir (rw)
      /var/jenkins_config from jenkins-config (rw)
      /var/jenkins_home from jenkins-home (rw)
      /var/jenkins_plugins from plugin-dir (rw)
  Containers:
   jenkins:
    Image:       jenkins/jenkins:lts
    Ports:       8080/TCP, 50000/TCP
    Host Ports:  0/TCP, 0/TCP
    Args:
      --argumentsRealm.passwd.$(ADMIN_USER)=$(ADMIN_PASSWORD)
      --argumentsRealm.roles.$(ADMIN_USER)=admin
    Limits:
      cpu:     2
      memory:  4Gi
    Requests:
      cpu:      50m
      memory:   256Mi
    Liveness:   http-get http://:http/login delay=90s timeout=5s period=10s #success=1 #failure=5
    Readiness:  http-get http://:http/login delay=60s timeout=5s period=10s #success=1 #failure=3
    Environment:
      JAVA_OPTS:
      JENKINS_OPTS:
      JENKINS_SLAVE_AGENT_PORT:  50000
      ADMIN_PASSWORD:            &lt;set to the key 'jenkins-admin-password' in secret 'jenkins'&gt;  Optional: false
      ADMIN_USER:                &lt;set to the key 'jenkins-admin-user' in secret 'jenkins'&gt;      Optional: false
    Mounts:
      /tmp from tmp (rw)
      /usr/share/jenkins/ref/plugins/ from plugin-dir (rw)
      /usr/share/jenkins/ref/secrets/ from secrets-dir (rw)
      /var/jenkins_config from jenkins-config (ro)
      /var/jenkins_home from jenkins-home (rw)
  Volumes:
   plugins:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  &lt;unset&gt;
   tmp:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  &lt;unset&gt;
   jenkins-config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      jenkins
    Optional:  false
   plugin-dir:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  &lt;unset&gt;
   secrets-dir:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  &lt;unset&gt;
   jenkins-home:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  jenkins-pvc
    ReadOnly:   false
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      False   MinimumReplicasUnavailable
  Progressing    True    ReplicaSetUpdated
OldReplicaSets:  jenkins-86dcf94679 (1/1 replicas created)
NewReplicaSet:   &lt;none&gt;
Events:
  Type    Reason             Age   From                   Message
  ----    ------             ----  ----                   -------
  Normal  ScalingReplicaSet  42s   deployment-controller  Scaled up replica set jenkins-86dcf94679 to 1
</code></pre>
