Date: 2024-10-16 05:34:52
Score: 2
Natty:
I made few changes which eventually resolved my issue.
- In the configuration, for jenkins url I have given http://jenkins.jenkins.svc.cluster.local:8080. I thought this is the default url. Turned out, the pattern is http://jenkins-service.namepace.svc.cluster.local:8080. So in my case, its http://jenkins.jenkins-1.svc.cluster.local:8080 as my namespace is jenkins-1
- I have removed the jenkins tunnel URL. Even though, I don't think that will make any difference.
- In pod template, I have removed the default values in command to run(sleep) and argument to pass to the command (9999999).
- In the environment variables of the container, I have passed the following. JENKINS_TUNNEL: jenkins-agent.jenkins-1.svc.cluster.local:50000 and JENKINS_URL: http://jenkins.jenkins-1.svc.cluster.local:8080
The below are the links I was referring
- https://devopscube.com/jenkins-build-agents-kubernetes
- https://github.com/helm/charts/issues/7360
Reasons:
- Probably link only (1):
- Long answer (-0.5):
- No code block (0.5):
- Self-answer (0.5):
- Low reputation (0.5):
Posted by: Guru