I'm following this tutorial to create a jenkins server on my Kubernetes server.
I've got a volume
apiVersion: v1
kind: PersistentVolume
metadata:
name: jenkins-pv
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1000Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/t1/kubernetes/vol/"
and a volume claim
---
# PersistentVolume for Jenkins
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jenkins-pv-claim
namespace: ns-jenkins # PV are not scoped to any namespace, but pvc is associated with the namespace
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
If I navigate to the mounted location inside Jenkins and run touch test
, I get touch: cannot touch 'test': Permission denied
User looks right.
$ id
uid=1000(jenkins) gid=1000(jenkins) groups=1000(jenkins)
I've even gone so far as to make the host folder 777 permissions and no luck. What's going on?