Questions tagged [jenkins-kubernetes]

49 questions
1
vote
1 answer

jnlp kubernetes slave agent issue

Hi I have been trying to investigate why a jnlp k8s agent hangs in offline and saw the below errors in master Jenkins: WARNING: Error in provisioning; agent=KubernetesSlave name: k8s-inbound-agent-36bxc,…
Avi
  • 1,453
  • 4
  • 18
  • 43
1
vote
2 answers

Kubernetes cluster pods as Jenkins Build Agents

I have installed Kubernetes plugin - 1.23.3 in our Jenkins and able to execute shell commands on kubernetes pod(Dynamic Jenkins Slave). this is working with default jnlp & jenkins/jnlp-slave:latest Suppose if I change the below "Name" & "Docker…
user4948798
  • 1,924
  • 4
  • 43
  • 89
1
vote
1 answer

how to fetch agent pod template from different repository in jenkins pipeline

I want to keep jenkins pipeline agents (kubernetes pod) templates in Repo A. The jenkinsfile is in Repo B. To run stage 'ci' on Repo B, I need agents folder checked out from Repo A. pipeline { agent none stages { stage('ci') { agent { …
1
vote
1 answer

How to configure permissions on jenkins kubernetes plugin to access remote GKE Cluster

I have Jenkins set up on GCE and from there I am trying to access k8s cluster on GKE. I get unauthorized when I try to test a connection on the plugin. I have enabled GKE API access, created a service account on GKE, created role and role binding.…
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…
0
votes
1 answer

Kubernetes Cloud Configuration as Agent in Jenkins: Issue - Continuous Pod Creation and Unknown Client Name Error

I am working on configuring a Kubernetes cloud environment to manage agent provisioning for our QA Jenkins server. However, we are encountering two main issues: Continuous Pod Creation: After starting a Jenkins job, we observe a continuous creation…
0
votes
1 answer

Jenkins Kubernetes Setup

We have setup jenkins in kubernetes cluster. In a pipeline we are calling an agent, actually this agent contains 3 containers of which 1 container can be used by next stage. But the problem is since I'm mentioning agent in every stage, each stage…
0
votes
0 answers

Jenkins Master Memory Issues

Our jenkins is running in kubernetes. The memory limit for jenkins-master is 10GB, curreltly its using 9.1GB. Even if i'm not running any pipleine the memory will be same. So I restarted and the memory usage decresed to 3GB, I have set up prometheus…
0
votes
0 answers

Jenkins for Kubernetes, how to prevent ClosedChannelException and keep pod agent alive

I am using Jenkins for Kubernetes, and sometimes the connection to the agent Pod is lost because of ClosedChannelException. From my experience, we observe that this is because of either: Random lost connection to the pod, especially when the pod is…
aldo
  • 125
  • 1
  • 7
0
votes
0 answers

ERROR: Unable to create pod kubernetes jenkins/pod-name

Installed Jenkins on the EKS. I have configured Jenkins pipeline which is creating Jenkins agent as a temporary kubernetes pod using Jenkins-global library. The podTemplate is defined in Jenkins.groovy file with YAML template. That YAML template is…
0
votes
0 answers

Jenkins kubernetes plugin using 2 podTemplates according to job use case

I have 2 podTemplates inside my kubernetes cloud plugin but I fail to understand how to tag my pipeline jobs to use the second podTemplate. It just keeps using the first one I configured as a default. My use case is this - I want to tag several jobs…
deez
  • 1,472
  • 3
  • 18
  • 28
0
votes
0 answers

Accessing k8s secrets in a Jenkins pipeline

CloudBees CI Managed Controller 2.361.1.2-rolling running on OpenShift. There is a k8s secret in the agents namespace: I need to access this in my Jenkins pipeline e.g. script.withCredentials([script.string( credentialsId:…
Kaliyug Antagonist
  • 3,512
  • 9
  • 51
  • 103
0
votes
0 answers

Adding configMap as a volume to a container in an OCP deployment

I have a deployment of 3 containers in OCP. In one of them there is a configuration file which I want to mount to the container via configMap. I created a configMap and tried to mount it to the container but it didn't work. I use 'csanchez jenkins…
0
votes
0 answers

Upgrading Jenkins running in Kubernetes cluster

I am running Jenkins in Kubernetes, specifically using the jenkins/jenkins: docker image in the pod spec to run the Jenkins instance. Is there any documentation or steps on how to upgrade the Jenkins core version when running it in Kubernetes? The…
SS123
  • 3
  • 2
0
votes
1 answer

Kaniko Image Cache in Jenkins Kubernetes Agents

Here's the Jenkinsfile, I'm spinning up: pipeline { agent { kubernetes { yaml ''' apiVersion: v1 kind: Pod metadata: name: kaniko …