1
votes

I install Jenkins via Helm charts on my Kubernetes Cluster. I follow the rules described in: https://www.jenkins.io/doc/book/installing/kubernetes/

When I look at the pods, I get the following error:

k get po
NAME                       READY   STATUS             RESTARTS   AGE
jenkins-64d6449859-tgp7n   1/2     CrashLoopBackOff   3          101s


k logs jenkins-64d6449859-tgp7n -c copy-default-config

applying Jenkins configuration
disable Setup Wizard
download plugins
/var/jenkins_config/apply_config.sh: 4: /var/jenkins_config/apply_config.sh: cannot create /var/jenkins_home/jenkins.install.UpgradeWizard.state: Permission denied
/var/jenkins_config/apply_config.sh: 5: /var/jenkins_config/apply_config.sh: cannot create /var/jenkins_home/jenkins.install.InstallUtil.lastExecVersion: Permission denied
cp: cannot create regular file '/var/jenkins_home/plugins.txt': Permission denied
cat: /var/jenkins_home/plugins.txt: No such file or directory
WARN: install-plugins.sh is deprecated, please switch to jenkins-plugin-cli
Creating initial locks...
Analyzing war /usr/share/jenkins/jenkins.war...
Registering preinstalled plugins...
Using version-specific update center: https://updates.jenkins.io/dynamic-2.248/...
Downloading plugins...

WAR bundled plugins:


Installed plugins:
*:
Cleaning up locks
copy plugins to shared volume
cp: cannot stat '/usr/share/jenkins/ref/plugins/*': No such file or directory
finished initialization
1
The log of the container running jenkins itself would be more interesting.Henry

1 Answers

1
votes

If you use the default settings from the documentation, ensure that the PVC are correctly set and ensure that all objects are in the same namespace.

The solution to my problem was:

  • getting everything under the same namespace
  • reverting to standard values
  • when using an ingress resource, set the corresponding path in the helm config (jenkinsUriPrefix: "/yourpath") and not the jenkinsOpts: "--prefix=/yourpath"