I’m trying to install Jenkins on Kubernetes with the official guide: [at Jenkin’s site][1], Install Jenkins with Helm v3. The environment: minukube on Ubuntu.
- I created namespace jenkins
- Created Persistent Volume:
apiVersion: v1
kind: PersistentVolume
metadata:
name: jenkins-pv
namespace: jenkins
spec:
storageClassName: jenkins-pv
accessModes:
- ReadWriteOnce
capacity:
storage: 20Gi
persistentVolumeReclaimPolicy: Retain
hostPath:
path: /data/jenkins-volume/
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: jenkins-pv
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
- Created service account
- Installed with Jenkins with Helm
helm install jenkins -n jenkins -f jenkins-values.yaml jenkinsci/jenkins
, where values are official too
I only alerted Jenkins values as it was recommended in the instruction (added values below):
storageClass: jenkins-pv
...
serviceAccount:
create: false
The issue: Jenkins pod never starts.
It says: “0/1 nodes are available: 1 node(s) didn’t find available persistent volumes to bind. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling…”
Pod:
rage@ubuntu-virtual:~$ kubectl describe pod jenkins-0 -n jenkins
Name: jenkins-0
Namespace: jenkins
Priority: 0
Service Account: jenkins
Node: <none>
Annotations: checksum/config: c72ccb23c5ece5a66b48a7e67a820c370fba9a27fc2e59be7866fada3541dfb7
Status: Pending
IP:
IPs: <none>
Controlled By: StatefulSet/jenkins
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 37s default-scheduler 0/1 nodes are available: 1 node(s) didn't find available persistent volumes to bind. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling..
PV is created:
rage@ubuntu-virtual:~$ kubectl describe pv jenkins -n jenkins
Name: jenkins-pv
Labels: <none>
Annotations: pv.kubernetes.io/bound-by-controller: yes
Finalizers: [kubernetes.io/pv-protection]
StorageClass: jenkins-pv
Status: Released
Claim: default/jenkins
Reclaim Policy: Retain
Access Modes: RWO
VolumeMode: Filesystem
Capacity: 20Gi
Node Affinity: <none>
Message:
Source:
Type: HostPath (bare host directory volume)
Path: /data/jenkins-volume/
HostPathType:
Events: <none>
PVC says: “WaitForPodScheduled”
$ kubectl describe pvc jenkins -n jenkins
Name: jenkins
Namespace: jenkins
StorageClass: jenkins-pv
Status: Pending
Volume:
Labels: app.kubernetes.io/component=jenkins-controller
app.kubernetes.io/instance=jenkins
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=jenkins
helm.sh/chart=jenkins-4.3.23
Annotations: meta.helm.sh/release-name: jenkins
meta.helm.sh/release-namespace: jenkins
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Used By: jenkins-0
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal WaitForPodScheduled 38m (x481 over 160m) persistentvolume-controller waiting for pod jenkins-0 to be scheduled
Normal WaitForPodScheduled 28m (x26 over 34m) persistentvolume-controller waiting for pod jenkins-0 to be scheduled
Normal WaitForPodScheduled 2m35s (x81 over 22m) persistentvolume-controller waiting for pod jenkins-0 to be scheduled
Please, help investigate to this problem.