Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
750 views
in Technique[技术] by (71.8m points)

kubernetes - Unable to install Jenkins on Minikube using Helm due to the permission

I've been trying to install Jenkins by using Helm on Minikube according to the official article

https://www.jenkins.io/doc/book/installing/kubernetes/

It turns out that I can't bring up the Jenkins Pod, kubectl logs -f jenkins-0 -c init -n jenkins gives me this error

disable Setup Wizard
/var/jenkins_config/apply_config.sh: 4: /var/jenkins_config/apply_config.sh: cannot create /var/jenkins_home/jenkins.install.UpgradeWizard.state: Permission denied

From my assumption, this issue obviously relates with permission in Dockerfile or it might relates to the defined values in jenkins-values.yaml. I've changed some parameters as the recommended values.

storageClass: jenkins-pv

serviceAccount:
create: false
name: jenkins
annotations: {}

serviceType: NodePort

release detail

NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
jenkins jenkins         1               2021-01-04 15:58:00.022465588 +0700 +07 deployed        jenkins-3.0.14  2.263.1   

is there anyway to fix this?

Thanks

question from:https://stackoverflow.com/questions/65560504/unable-to-install-jenkins-on-minikube-using-helm-due-to-the-permission

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems that for some reason the volume is mounted with not-enough access rights. You can try running your container with the root user. It may solve the issue. Put these lines into your values.yaml.

runAsUser: 0
fsGroup: 0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...