Questions tagged [kubernetes-jenkins-plugin]
21 questions
5
votes
1 answer
When I use Kubernetes as my agent in Jenkins it will not allow another executor in stage
This is a subset of my declarative Jenkinsfile:
pipeline {
agent {
kubernetes {
yamlFile 'pod.yml'
defaultContainer 'tools'
}
}
stages {
stage('Init') { // <- this stage executes in Kubernetes and…

yusuf tezel
- 1,232
- 13
- 18
4
votes
1 answer
Check if container exists when using Kubernetes plugin for jenkins
Our pipeline by default tries to use a container that matches the name of the current stage.
If this container doesn't exist, the container 'default' is used.
This functionality works but the problem is that when the container that matches the name…

RedEclipse
- 41
- 1
- 3
4
votes
4 answers
Terraform fail to download existing bitnami chart
I am planning to setup jenkins pipeline on K8S using terraform to provising my CI/CD environment.
I am using Terraform v0.12.18
My terraform file has following resource
resource "helm_release" "jenkins-master" {
name = "jenkins"
chart =…

Alpesh Jikadra
- 1,692
- 3
- 18
- 38
4
votes
1 answer
Jenkins kubernetes-plugin not understanding env variable in scripted pipeline
Jenkins version 2.235.2
kubernetes-plugin version 1.26.4
I'm trying to parametrize the yamlFile used as pod template with a env variable based on the branch I'm building. What I have right now is:
pipeline {
environment {
MASTER_BRANCH =…

Ale Sanchez
- 536
- 1
- 6
- 17
3
votes
1 answer
Certificate issue for launching kubernetes pods for Jenkins (hosted outside of that kubernetes cluster)
I have been trying to configure jenkins kubernetes cloud agents on my existing jenkins setup (which is hosted outside k8s cluster).
My jenkins is hosted in Google Cloud Platform in a Windows VM. It is exposed to internet and we have a ssl…

ashkaps
- 61
- 6
3
votes
1 answer
Pods terminated immediately from Jenkins to Kubernetes cluster
I have jenkins running on Windows as a service on 127.0.0.1:8080
and minikube running on 192.168.99.101
below is the pipeline for Jenkins job
podTemplate(
activeDeadlineSeconds: 240,
name: 'default',
inheritFrom: 'default',
nodeSelector:…

elliot alderson
- 53
- 1
- 9
2
votes
2 answers
jenkins not downloading parent POM for spring boot 2.2.2.Release
All flow is working fine locally but it is getting issue on jenkins. I am performing following steps:
1- created simple spring boot sample project downloaded strating from spring.io. Below is the pom

vicky
- 561
- 1
- 7
- 17
1
vote
1 answer
Jenkins Kubernetes builds fail with Forbidden (user=system:anonymous, verb=get, resource=nodes, subresource=proxy)
Exec Summary
Jenkins is running in a Kubernetes cluster just upgrade to 1.19.7 but now jenkins build scripts are failing when running
sh "kubectl --kubeconfig ${args.config} config use-context ${args.context}"
to give…

Nicholas Davies
- 11
- 2
1
vote
1 answer
Jenkins unable to build on kubernetes setup
I have a problem with Jenkins build and this is what I am seeing in the build log:
[Pipeline] Start of Pipeline
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Still waiting to schedule task
‘Jenkins’ doesn’t have label ‘ci’
I am not sure what…

Bob
- 8,392
- 12
- 55
- 96
1
vote
2 answers
Jenkins "Security Realm" configuration keeps changing by itself
I'm on Jenkins 2.235.2 and without any user input every once in a while (like half an hour at most) the security settings just changes itself back to "Delegate to servlet container" instead of "Jenkins' own user database". I can change it back and…

K. M
- 867
- 1
- 8
- 17
1
vote
1 answer
Use "label" or define a pod template in jenkinsfile for kubernetes-plugin?
In General
I'm trying to use label when using kubernetes-plugin for Jenkins, but I get a little bit confused.
In my pipeline bellow I'm trying to build test job in parallel steps with different labels (agents).
I already have configured the plugin…

airdata
- 577
- 1
- 7
- 23
1
vote
1 answer
Jenkins pipelines stuck - Waiting for next available executor
I have a pipeline script with agent any which doesn't work anymore.
It is stuck @ Waiting for next available executor
pipeline {
agent any
stages {
stage('Stage1') {
steps {
sh 'java -version'
…

niklodeon
- 1,320
- 5
- 20
- 51
1
vote
0 answers
Jenkins kubernetes-plugin Parallelise declarative Jenkinsfile
Using kubernetes-plugin Parallelise declarative Jenkinsfile how do you run stages in parallel, when each stage uses the same container? (eg: sonar_qube analysis and unit testing both run on a maven container.
I have tried the following in…

Melissa
- 812
- 2
- 10
- 24
1
vote
1 answer
Jenkins NodeJS plugin: can't execute 'node'
When using the NodeJS tool on a slave that is configured with a global package, the following error is given:
env: can't execute 'node': No such file or directory
If the build runs on an executor in master, there is no error and the package is…

Jacob Lambert
- 7,449
- 8
- 27
- 47
0
votes
0 answers
EKS Jenkins Kubernetes plugin tcpSlaveAgentListener/: connect timed out
I have deployed Jenkins on EKS using the helm chart. The Kubernetes plugin is installed and populated with default values. I am getting the below error whenever I run the job.
- jnlp -- terminated (255)
-----Logs-------------
INFO: Using…

zuri_nahk
- 21
- 2
- 4