here is the the pvc yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jenkins-pvc
namespace: default
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 200Gi
storageClassName: standard
here is the storage class:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: standard
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
fsType: ext4
reclaimPolicy: Retain
allowVolumeExpansion: true
mountOptions:
- debug
volumeBindingMode: Immediate
-- here is the pv
apiVersion: v1
kind: PersistentVolume
metadata:
name: jenkins-pv
spec:
capacity:
storage: 200Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
- ReadOnlyMany
persistentVolumeReclaimPolicy: Retain
storageClassName: standard
hostPath:
path: /data/shared/jenkins
Here is the command am using:
helm install --set persistence.existingClaim=jenkins-pvc --set master.serviceType=NodePort stable/jenkins --generate-name
error : Pod init state.
here is the init container error: here is the init container error [map[containerID:docker://1e2d565bfde2a84410a63d028b73215fd4c81fd552cc246e0c517e4c76c69c67 image:jenkins/jenkins:lts imageID:docker-pullable://jenkins/jenkins@sha256:d5069c543e80454279caacd13457d012fb32c5229b5037a163d8bf61ffa6b80b lastState:map[terminated:map[containerID:docker://1e2d565bfde2a84410a63d028b73215fd4c81fd552cc246e0c517e4c76c69c67 exitCode:1 finishedAt:2020-01-07T07:13:13Z reason:Error startedAt:2020-01-07T07:06:18Z]] name:copy-default-config ready:false restartCount:4 state:map[waiting:map[message:back-off 1m20s restarting failed container=copy-default-config pod=jenkins-1578379025-ccf77dfc-wtnww_default(ca6e0e22-7cf6-487d-b6e4-0223a1dc46a0) reason:CrashLoopBackOff]]]]
Can anyone help?