Re: [Jenkins Kubernetes Plugin] How to restrict/choose kubernetes Cloud access from jenkinsfile

2019-03-05 Thread Carlos Sanchez
Something along the lines of https://github.com/jenkinsci/kubernetes-plugin/#restricting-what-jobs-can-use-your-configured-cloud plus maybe some RBAC on the Kubernetes side to prevent service account from doing things you don't want them to do On Tue, Mar 5, 2019 at 7:00 PM Nadir Mouhoubi wrote:

Re: One Jenkins, Multiple Kubernetes Clusters

2019-03-07 Thread Carlos Sanchez
are you creating pod templates in UI or in pipeline? in UI is just a matter of assigning different labels to different pod templates in different clouds in pipeline you can pass an argument "cloud" to podTemplate On Wed, Mar 6, 2019 at 8:23 PM Steve Garrett wrote: > Hi, > > I'm trying to use mu

Re: Kubernetes plugin in a JobDSL environment

2019-04-04 Thread Carlos Sanchez
You can't use 'container' with freestyle jobs, there's no way to switch containers . IIRC you can set the default container to be different than jnlp On Thu, Apr 4, 2019, 20:34 Sean Walberg wrote: > Hi, > > The kubernetes-plugin has the "container" keyword to run commands inside > the given cont

Re: kubernetes plugin 1.15.1 deletes the pod yaml specified in "Manage Jenkins" Cloud section.

2019-04-22 Thread Carlos Sanchez
this has been fixed in 1.15.2 https://issues.jenkins-ci.org/browse/JENKINS-57112 On Thu, Apr 18, 2019 at 9:13 PM Philip Mason wrote: > Hi, > > I installed the latest kubernetes plugin 1.15.1 and found that all of my > container pod yaml snippets were deleted and anything I put in the text box >

Re: JNLP java.nio.channels.ClosedChannelException with kubernetes-plugin

2019-04-25 Thread Carlos Sanchez
what kubernetes cluster are you using and with what networking? my guess is that the underlying network layer is killing inactive connections On Thu, Apr 25, 2019 at 4:24 AM Gopi Naidu wrote: > I have got into the same issue. Could you please post the solution if > anything is found? > > On Sund

Re: JNLP java.nio.channels.ClosedChannelException with kubernetes-plugin

2019-04-25 Thread Carlos Sanchez
rnetes 1.13 with 3 master nodes. > > On Thu, Apr 25, 2019 at 2:15 PM Carlos Sanchez wrote: > >> what kubernetes cluster are you using and with what networking? >> my guess is that the underlying network layer is killing inactive >> connections >> >> On Thu, A

Re: Remote logging Kubernetes agents dying due to channel closed exception

2019-04-25 Thread Carlos Sanchez
you should look into the networking layer in your kubernetes cluster, it may be aggressively closing connections On Thu, Apr 25, 2019 at 8:34 PM Andrew Feller wrote: > We've been trying to troubleshoot OpenShift-support > Jenkins > Ku

Re: Kubernetes plugin - Service account authorization in Google Cloud

2019-05-16 Thread Carlos Sanchez
the right way for Kubernetes apps is to create a ServiceAccount https://cloud.google.com/solutions/jenkins-on-kubernetes-engine https://cloud.google.com/solutions/jenkins-on-kubernetes-engine-tutorial https://github.com/jenkinsci/kubernetes-plugin#running-in-google-container-engine-gke On Wed, Ma

Re: Jenkins Kubernetes plugin credentials for Google Kubernetes Engine cluster

2019-06-19 Thread Carlos Sanchez
you can create certificate credentials too, but the best way is to use a service account token (secret string) On Tue, Jun 18, 2019 at 11:51 PM samt88 wrote: > I need to setup the Jenkins Kubernetes plugin to fire off slaves on > demand. The top portion of the plugin requires us to provide two i

Re: Jenkins Kubernetes plugin credentials for Google Kubernetes Engine cluster

2019-06-21 Thread Carlos Sanchez
iliar with issues surrounding tokens and secret strings. I am > sure my question also helps others who would like to setup Jenkins on > Google cloud without using helm or other utilities. Thanks. > > On Wednesday, June 19, 2019 at 4:55:54 AM UTC-7, Carlos Sanchez wrote: >> >>

Re: Jenkins Kubernetes Plugin not honoring activeDeadlineSeconds parameter

2019-10-18 Thread Carlos Sanchez
the plugin will delete the kubernetes pod after the jenkins job is completed Also I don't think activeDeadlineSeconds is what you want activeDeadlineSeconds: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed a

Re: Jenkins Kubernetes Plugin not honoring activeDeadlineSeconds parameter

2019-10-18 Thread Carlos Sanchez
d after activeDeadlineSeconds has passed. >- activeDeadlineSeconds If podRetention is set to 'never()' or >'onFailure()', pod is deleted after this deadline is passed. > > If this is totally wrong, can you recommend a right way to retain a pod > even if the

Re: [Jenkins Kubernetes Plugin] Issues building plugin from source

2019-10-21 Thread Carlos Sanchez
you would need to check the pod logs, to see what happened probably the pods can't connect to jenkins and you may need to set the hot ip in maven anyway if you submit a PR it will be tested in jenkins infra and will give you the test results If your minikube is running in a VM (e.g. on virtualbox)

Re: [Jenkins Kubernetes Plugin] Issues building plugin from source

2019-10-21 Thread Carlos Sanchez
local jenkins" is it possible that this is > not starting correctly? I can't see a copy of Jenkins running anywhere > during testing. > > I'm using minikube on hyperkit for testing > > > Andrew > > On Monday, October 21, 2019 at 11:14:11 AM UTC+1, Carlo

Re: k8s plugin

2019-12-02 Thread Carlos Sanchez
No, It has to live in the same repo On Mon, Dec 2, 2019, 16:39 YD wrote: > Hi all > > in kubernetes plugin i want to use yaml that i managed in my git server > (public repo) > > does something like that should work ? > > pipeline { > agent { > kubernetes > { > yamlFile '/somey

Re: k8s plugin

2019-12-03 Thread Carlos Sanchez
; pipeline { > agent { > kubernetes > { > yamlFile '/k8s/someyaml.yaml' > } > } > > On Monday, December 2, 2019 at 6:16:03 PM UTC+2, Carlos Sanchez wrote: >> >> No, It has to live in the same repo >> >> On Mon, Dec 2, 2019, 16:

Re: Kubernetes plugin ( want to run slave as pod )

2017-12-30 Thread Carlos Sanchez
what logs and events are you getting when you run * kubectl logs your_pod_slave * kubectl describe your_pod_slave are you getting "failed to open log file" there? if you do it looks like a kubernetes issue, like https://github.com/kubernetes/kubernetes/issues/45911 that points to your container r

Re: How to use podTemplate in a declarative pipeline with the kubernetes-plugin.

2018-01-03 Thread Carlos Sanchez
:03:46 PM UTC+3, Vincent Heet wrote: >>>> >>>> Ok so maybe i'm able to add this myself next week. I looked at the >>>> class you mentioned but would adding the PodTemplate class as a property >>>> there fix my issue? And I'm not sure why you men

Re: Kubernetes plugin ( want to run slave as pod )

2018-01-04 Thread Carlos Sanchez
AM UTC-8, Carlos Sanchez wrote: >> >> what logs and events are you getting when you run >> >> * kubectl logs your_pod_slave >> * kubectl describe your_pod_slave >> >> are you getting "failed to open log file" there? if you do it looks like

Re: Kubernetes Plugin: Option to run pod as different user (e.g. as root)

2018-01-10 Thread Carlos Sanchez
t implementing an option to run a build pod (using > the kubernetes plugin from Carlos Sanchez) as a different user. > > @Carlos: Great work, we love the ability to define our own pod templates! > > > *Software versions:* > >- > >Jenkins version: 2.89.2

Re: Kubernetes-Plugin BadRequest container name must be specified

2018-01-22 Thread Carlos Sanchez
t; > pod-golang from here ( > https://kumorilabs.com/blog/k8s-6-integrating-jenkins-kubernetes/) > and one from Carlos Sanchez blog here ( > https://blog.csanchez.org/2016/10/25/jenkins-kubernetes-plugin-0-9-released/ > ) > > Both pods create with the following logs and loop: >

Re: A recent change (or bug) in either Docker and/or Jenkins is breaking most tutorials in the Jenkins User Documentation.

2018-01-30 Thread Carlos Sanchez
This is biting a lot of users and reporting it as a bug https://github.com/jenkinsci/docker/issues/626 On Tue, Jan 30, 2018 at 2:27 AM, wrote: > Hi All, > > I've updated all the plug-in for jenkins but I still can't get the > tutorial to work. I'm getting this error when it runs > > [simple-ja

Re: Kubernetes-Plugin BadRequest container name must be specified

2018-01-31 Thread Carlos Sanchez
pipeline jobs to test: >> >> pod-golang from here (https://kumorilabs.com/blog/k >> 8s-6-integrating-jenkins-kubernetes/) >> and one from Carlos Sanchez blog here (https://blog.csanchez.org/201 >> 6/10/25/jenkins-kubernetes-plugin-0-9-released/) >> >> Both po

Re: No credentials/secrets pulled from master into PodTemplate/ContainerTemplate by Jenkins Kubernetes Plugin during pipeline execution?

2018-02-08 Thread Carlos Sanchez
gt; svn: E175002: OPTIONS request failed on '/svn/repo' > at org.tmatesoft.svn.core.internal.wc.SVNErrorManager. > error(SVNErrorManager.java:112) > > on master -- where checkout works -- checkout lines look like: > > Checking out https://svn.some-company.com/svn/repo

Re: jenkins slave offline

2018-02-09 Thread Carlos Sanchez
you can check the steps in https://github.com/jenkinsci/kubernetes-plugin/#debugging to debug On Fri, Feb 9, 2018 at 7:09 AM, Nick Li wrote: > jenkins-slave is offline (suspend) from jenkins webpage. > > My environment: > I have jenkins running on a debian server, created a k8s cluster in gcp. >

Re: jenkins slave offline

2018-02-09 Thread Carlos Sanchez
n/k8s-password. > > Error testing connection http://my-kubernetes-cluster-ip: > java.net.SocketTimeoutException: > connect timed out > > Thanks > > On Friday, February 9, 2018 at 5:04:38 PM UTC+8, Carlos Sanchez wrote: >> >> you can check the steps in https://github.com

Re: jenkins slave offline

2018-02-13 Thread Carlos Sanchez
> Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address MY_JENKINS_IP found If you don't use valid ssl certificates in the jenkins master you'll need to configure Java in the jnlp agent docker, it has nothing to do

Re: Kubernetes Plugin 1.2 Agents unable to establish connection to master, but log they can

2018-02-22 Thread Carlos Sanchez
That log suggests that the slave is not "online" for jenkins. If you go to the jenkins nodes page under /computer/ what do you see? maybe the slave is offline for some reason, lack of space or something On Wed, Feb 21, 2018 at 9:25 PM, wrote: > I've downgraded to the 1.2 version of the plugin an

Re: Kubernetes Plugin 1.2 Agents unable to establish connection to master, but log they can

2018-02-22 Thread Carlos Sanchez
OOMKilled has nothing to do with the host resources, but the process in the container using more memory than available. Try increasing the memory limits and read https://blog.csanchez.org/2017/05/31/running-a-jvm-in-a-container-without-getting-killed/ On Thu, Feb 22, 2018 at 10:19 AM, wrote: > D

Re: Kubernetes Plugin share workspace

2018-02-27 Thread Carlos Sanchez
You should be able to mount the workspace as an external volume using persistentVolumeClaim in your podTemplate On Mon, Feb 26, 2018 at 11:02 PM, Matthew Ceroni wrote: > Is it possible, much like with the docker agent and reuseNode option, to > share a work space between multiple kubernetes pods

Re: Connecting static node within 'jenkins-kubernetes-plugin' dynamic environment.

2018-03-05 Thread Carlos Sanchez
yes, you can do that, using the tunnel parameter of the jnlp-slave jar If you want to run an external agent on docker use JENKINS_TUNNEL=your_node_ip:your_node_port for instance https://github.com/jenkinsci/docker-jnlp-slave#running On Mon, Mar 5, 2018 at 11:34 AM, WANG, YAN-HONG wrote: > Hello,

Re: Kubernetes and docker syntax for jenkins declarative pipeline

2018-03-05 Thread Carlos Sanchez
You would probably be interested in https://issues.jenkins-ci.org/browse/JENKINS-48050 On Mon, Mar 5, 2018 at 1:08 PM, Tristan FAURE wrote: > Hello all, > > we are currently experiencing docker capabilities in jenkins with > Jenkinsfile and declarative pipelines using this instruction : > agent

Re: Kubernetes plugin cloud not found error

2018-03-15 Thread Carlos Sanchez
You need to use "add cloud" in jenkins configuration On Wed, Mar 14, 2018, 06:38 Prasanna Ranganathan wrote: > Hi, > > I was trying the kubernetes plugin. I installed and configured the > kubernetes setup connection test was successfull. > and tried the below code. > > def label = "mypod-${UUID.

Re: Example of a working pod with the kubernetes-ci plugin

2018-03-20 Thread Carlos Sanchez
Yes it totally does. You need to open the ports from agent to master On Tue, Mar 20, 2018, 21:19 Fadi Al-Farah wrote: > I'm also interested in this.. Does this plugin support having a Jenkins > master running somewhere else and the slaves in the k8s cluster? > > > On Thursday, December 28, 2017

Re: Jenkins Kubernetes agents fail handshake with master.

2018-04-09 Thread Carlos Sanchez
Are you running jenkins with SSL enabled ? or are you running jenkins non-ssl and then enabling ssl at ingress level The plugin will connect internally to the cluster so typically no SSL url is used On Sun, Apr 8, 2018 at 10:37 PM, Ryan Timoney wrote: > I've got Jenkins running on an instance

Re: kubernets plugin jnlp4

2018-04-24 Thread Carlos Sanchez
All the plugin builds are running in GKE and I haven't experienced any failed jobs for a while. Jenkins weekly and k8s latest release with default jnlp image On Mon, Apr 23, 2018 at 9:58 PM, Edward Bond wrote: > Hello All, > > I am using Jenkins LTS, 2.107.2. with kubernetes plugin: 1.1.3, jnlp-

Re: [kubernetes-plugin] Define pod with yaml

2018-04-26 Thread Carlos Sanchez
there's a typo in the example defaultContainer: 'jnlp' should be defaultContainer 'jnlp' see https://github.com/jenkinsci/kubernetes-plugin/pull/316 On Thu, Apr 26, 2018 at 8:42 AM Ram Kamath wrote: > Dear Jenkins Users, > > I am trying to make use of the pod creation with yaml feature introduce

Re: kubernets plugin jnlp4

2018-04-27 Thread Carlos Sanchez
$1.run(ContextResettingExecutorService.java:28) > > >1. at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) >2. at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) >3. a

Re: [Kubernetes-Plugin] Declarative pipelines with Pod yaml, jnlp arguments issue

2018-05-01 Thread Carlos Sanchez
Just remove the 'args' parameter, it would use environments variables On Tue, May 1, 2018, 20:18 Hung Do wrote: > Ah I thought I could just use the JNLP from the openshift-slave-maven-centos7 > directly. > The end goal is to do the

Re: parallel stages using multiple pod (with Kubernetes plugin)

2018-05-24 Thread Carlos Sanchez
if you want to use the same template this should work podTemplate(label: 'm1') { stage('sync') { parallel A: { node('m1') { sync } }, B: { node('m1') { sync } } } } If they are different, move the podTemplate to the parallel section {

Re: Kubernetes plugin configuration using groovy

2018-08-20 Thread Carlos Sanchez
Have you tried configuration as code plugin? On Mon, Aug 20, 2018, 15:54 Alex wrote: > I am trying to configure the kubernetes plugin by using groovy at startup. > > The problem that I have is that I can see the configuration in the > "Configure System" menu, but it's not working unless i click

Re: Volume issue with kubernetes plugin in declarative way (1.6.0 and 1.9.2)

2018-08-24 Thread Carlos Sanchez
On Fri, Aug 24, 2018 at 10:42 AM Tristan FAURE wrote: > Hello > > in my jenkins configuration admin GUI I have this volume definition : > > Volumes > - Claim Name = nfsdata > Read Only = true > Mount path = /etc/ssl/certs > > In scripted pipeline everything works perfectly > > In declarative pipe

Re: Some issues with env vars with kubernetes plugin declarative (1.6.0 and 1.9.2)

2018-08-24 Thread Carlos Sanchez
1 and 2 should work for sure, we have a test for env vars https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/test/resources/org/csanchez/jenkins/plugins/kubernetes/pipeline/runWithEnvVars.groovy On Fri, Aug 24, 2018 at 10:27 AM Tristan FAURE wrote: > Hello, > I'm waiting for your

Re: Volume issue with kubernetes plugin in declarative way (1.6.0 and 1.9.2)

2018-08-24 Thread Carlos Sanchez
On Fri, Aug 24, 2018 at 11:14 AM Tristan FAURE wrote: > > > Le ven. 24 août 2018 à 11:09, Carlos Sanchez a écrit : > >> >> >> On Fri, Aug 24, 2018 at 10:42 AM Tristan FAURE >> wrote: >> >>> Hello >>> >>> in my jenkins co

Re: Restrict what jobs can run on nodes created by the Kubernetes plugin

2018-08-28 Thread Carlos Sanchez
There is a way to restrict it by folder https://github.com/jenkinsci/kubernetes-plugin/pull/282/ I realized that it was never added to the docs On Tue, Aug 28, 2018 at 12:31 PM Adam Dougal wrote: > Hi, Is there any way to restrict what jobs can run on nodes created using > the Kubernetes plugi

Re: working kubernetes cloud not available in multi-branch pipeline

2018-08-28 Thread Carlos Sanchez
> When I configure a multi-branch pipeline, the Kubernetes cluster section are you talking about the section that says "Allow pipeline support for the following restricted Kubernetes Clouds" that's only for security restrictions You have to check what labels do you have defined in your pod templa

Re: working kubernetes cloud not available in multi-branch pipeline

2018-08-28 Thread Carlos Sanchez
:01 PM, Gabe Nydick wrote: > >> I don't see where I can add labels to my job. >> >> On Tue, Aug 28, 2018 at 1:00 PM, Gabe Nydick wrote: >> >>> Exactly that section. So I have to add labels to my multi-branch job to >>> match the labels in t

Re: multi-branch pipeline / kubernetes stage probem

2018-08-29 Thread Carlos Sanchez
Your example wouldn't even work, the jnlp container definition is wrong, can't use cat there containerTemplate(name: 'jnlp', image: '', command: 'cat', ttyEnabled: true) and then you try to use container('jenkins-agent') which is not defined On Wed, Aug 29, 2018 at 12:59 AM Gabe Nydick wrote:

Re: multi-branch pipeline / kubernetes stage probem

2018-08-29 Thread Carlos Sanchez
. >> >> On Wed, Aug 29, 2018 at 12:36 AM, Carlos Sanchez >> wrote: >> >>> Your example wouldn't even work, the jnlp container definition is wrong, >>> can't use cat there >>> >>> containerTemplate(name: 'jnlp', im

Re: declarative pod throwing error, following examples exactly...

2018-08-30 Thread Carlos Sanchez
Extra : after cat On Thu, Aug 30, 2018, 23:39 Gabe Nydick wrote: > Config below, getting the error immediately below. I'm interpreting the > error as the yaml is malformed, but it doesn't appear to be. > > hudson.remoting.ProxyException: > com.fasterxml.jackson.databind.JsonMappingException: Can

Re: How to use containerTemplates in declarative kubernetes agent definition

2018-09-07 Thread Carlos Sanchez
https://github.com/jenkinsci/kubernetes-plugin/blob/master/README.md#declarative-pipeline Note that it was previously possible to define containerTemplate but that has been deprecated in favor of the yaml format. containerTemplates also works but yaml syntax is preferred On Sat, Sep 8, 2018 at

Re: How to use containerTemplates in declarative kubernetes agent definition

2018-09-08 Thread Carlos Sanchez
ull > (https://issues.jenkins-ci.org/browse/JENKINS-53472) I'm not able to use > that as a drop-in replacement. I can workaround this by generating a > static yaml file from a template with variables expanded by something > external, but it's not as neat. > > Kind rega

Re: Jenkins is not getting connected to my kubernetes without authentication.

2018-09-10 Thread Carlos Sanchez
that's a known issue but doesn't affect plugin operation https://issues.jenkins-ci.org/browse/JENKINS-52912 On Mon, Sep 10, 2018 at 9:26 AM wrote: > Hi , > Using Jenkins ver. 2.121.3 and Kubernetes plugin : 1.12.6. > > "Manage jenkins" -> "Configure system" , in the cloud section the "Max > co

Re: pod inter connections inside k8s cluster

2018-09-17 Thread Carlos Sanchez
You need to use services if you want to expose pods If you put everything in one pod, you can use localhost to talk between containers On Mon, Sep 17, 2018, 18:57 JonathanRRogers wrote: > > > On Monday, September 17, 2018 at 11:29:33 AM UTC-4, Tristan FAURE wrote: >> >> Hello, >> I need your adv

Re: Jenkins master & slave connectivity after master restarts in kubernetes

2018-09-21 Thread Carlos Sanchez
This should work barring pipeline bugs, you would need to check the master and agent logs On Tue, Sep 18, 2018, 22:19 wrote: > we have a dynamic slave setup with kubernetes plugin. we have just one > master and one replica at this point with master home pointing to PV. > whenever the master goes

Re: How to build in specify container in freestyle job when using Kubernetes plugin?

2018-10-29 Thread Carlos Sanchez
you can't, you can only do it with pipeline jobs On Mon, Oct 29, 2018 at 1:56 PM 徐志远 wrote: > I set up a Container Template as follows, and want to execute shell in it > > > [image: Untitled picture.png] > > > > but when I use label "pyenv" in freestyle job and use python, I got error > message:

Re: Pod still released after "Pod Retention" set to "On Failure" for Kubernetes Plugin

2018-11-02 Thread Carlos Sanchez
When you say "pod still released" what do you mean? the retention means the pod will not be deleted in k8s but not used by jenkins On Fri, Nov 2, 2018 at 9:58 AM Evan wrote: > Jenkins 2.138.2 > > Kubernetes Plugin 1.13.2 > > > > When using kubernetes plugin to dynamically provision Jenkins slave

Re: custom image for jnlp( amazonlinux)

2018-11-15 Thread Carlos Sanchez
See Agent is not connected after 30 attempts, status: Running check your agent pod logs for errors. They should also show in the jenkins master log On Tue, Nov 13, 2018 at 11:36 PM Yaramada Surya tej wrote: > Here is the error logs while using custom image > > Error in provisioning; agent=Ku

Re: Kubernetes plugin - ready probe

2018-11-18 Thread Carlos Sanchez
you need to check your pod logs and k8s describe them to see what's the possible error On Sat, Nov 17, 2018 at 1:47 PM Romain Grécourt wrote: > Hi, > > I'm doing a Jenkins pipeline with the kubernetes plugin (1.12.4). > > Currently facing some odd behaviors where steps are executed before the >

Re: Kubernetes plugin - ready probe

2018-11-19 Thread Carlos Sanchez
gs. > > On Sun, Nov 18, 2018 at 11:56 PM Carlos Sanchez wrote: > >> you need to check your pod logs and k8s describe them to see what's the >> possible error >> >> On Sat, Nov 17, 2018 at 1:47 PM Romain Grécourt < >> romain.greco...@gmail.com>

Re: jenkins kubernetes yaml reference

2018-11-29 Thread Carlos Sanchez
You can find the YAML reference in kubernetes docs On Thu, Nov 29, 2018, 17:27 nirav wrote: > Is there a reference document where this is documented in detail for each > kind of kubernete entity - pod, service, deployment > > In past several months I saw 3 to 4 different style of defining this.

Re: Kubernetes Plugin - Fails When Executing Commands on Second Container

2018-12-10 Thread Carlos Sanchez
You may be hitting the limit of concurrent connections to k8s api, see https://github.com/jenkinsci/kubernetes-plugin/blob/master/CHANGELOG.md#1136 On Mon, Dec 10, 2018 at 8:01 AM Simon Young < simon.yo...@nationaltrust.org.uk> wrote: > Hi, > > We are trying to use the Kubernetes Plugin to run te

Re: Kubernetes Plugin - Fails When Executing Commands on Second Container

2018-12-11 Thread Carlos Sanchez
and the counter is reset when the config changes or after a period > of activity. Neither master nor slave appear to be running out of physical > resources, and this is the only job we're running on the master. > > Have you any idea what could be going on here? > > Simon. >

Re: Kubernetes Plugin - How to configure service account when master is not deployed in K8S?

2018-12-11 Thread Carlos Sanchez
secret text it is On Tue, Dec 11, 2018 at 7:49 AM wrote: > Hello all, > > I'm having issues with the Kubernetes Plugin: > https://github.com/jenkinsci/kubernetes-plugin > > I configured it successfully with Minikube, but once I moved to a real > cluster, I couldn't make it work. The plugin docum

Re: Kubernetes Plugin - How to configure service account when master is not deployed in K8S?

2018-12-14 Thread Carlos Sanchez
x27;t get it to work. I just pasted the token > after base64 decoding it. I receive a 401 while doing a curl with the same > token value works properly. > > Thank you very much for your fast response. > > Regards > > terça-feira, 11 de Dezembro de 2018 às 15:55:11 UTC, Car

Re: Kubernetes Plugin - Fails When Executing Commands on Second Container

2018-12-14 Thread Carlos Sanchez
This should be fixed in 1.13.8 On Fri, Dec 14, 2018, 08:31 Simon Young wrote: > Hi Carlos, > > Rolling back to 1.13.5 seems to have fixed the issue. I can now run > multiple consecutive builds and they all pass. > > I'm a bit concerned that we're unable to upgrade to the latest version > though

Re: Jenkins slaves in multiple kubernetes cluster

2019-01-04 Thread Carlos Sanchez
you can run agents in another cluster. You need to check the logs of both master and pods to see if the pods can't connect back to the master On Fri, Jan 4, 2019 at 3:03 PM wrote: > Hi, > Not sure if this is even possible using the K8s plugin. > We stood up a new K8s cluster and added its IP in

Re: Jenkins slaves in multiple kubernetes cluster

2019-01-04 Thread Carlos Sanchez
master can be anywhere, on prem, vm, kubernetes,... agents launch as pods On Fri, Jan 4, 2019 at 3:26 PM wrote: > Does that mean there will be a pod for master on cluster1 and another pod > for slave on cluster2? > > On Friday, 4 January 2019 14:17:58 UTC, Carlos Sanchez wrote: &

Re: Jenkins slaves in multiple kubernetes cluster

2019-01-07 Thread Carlos Sanchez
unched in cluster1. > Am I missing some setttings? > > On Fri, 4 Jan 2019 at 15:01, Carlos Sanchez wrote: > >> master can be anywhere, on prem, vm, kubernetes,... >> agents launch as pods >> >> On Fri, Jan 4, 2019 at 3:26 PM wrote: >> >>> Does that

Re: Kubernetes default jnlp container

2019-01-10 Thread Carlos Sanchez
You have to create a default PodTemplate and then put its name in the field "Defaults Provider Template Name" in settings On Thu, Jan 10, 2019 at 7:56 AM Maciej Gąsiorowski < maciej.m.gasiorow...@gmail.com> wrote: > Hi, > > It is possible to set custom default jnlp container (from private repo) >

Re: Kubernetes plugin - multi clusters

2019-01-17 Thread Carlos Sanchez
all cloud definitions are used by matching the labels of the pod templates and your job labels https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-Nodelabelsforagents On Thu, Jan 17, 2019 at 5:29 PM Tristan FAURE wrote: > Hello > The jenkins GUI allows the creation of

Re: Kubernetes plugin - multi clusters

2019-01-18 Thread Carlos Sanchez
> containers: > - name: node > image: node:8 > command: > - cat > tty: true > """ > } > } > > > Le jeudi 17 janvier 2019 17:44:43 UTC+1, Carlos Sanchez a écrit : >> >> all cloud definitions are used by matching the labels of the pod >> templates a

Re: Prov of pod template failing with "Service account may have been revoked"

2019-01-22 Thread Carlos Sanchez
User "slc11yke_k8s_user" cannot get pods/log in the namespace "default". On Tue, Jan 22, 2019, 09:59 wrote: > Hi , > My Jenkins is running on a pod and is configured to K8S. > when tried to run a job .. Provision of the pod template failing with > below error .. > === > > Waiting fo

Re: Kubernetes plugin - multi clusters

2019-01-23 Thread Carlos Sanchez
gt; cluster if any one of the cluster is down/not active >> >> On Friday, January 18, 2019 at 1:53:30 PM UTC+5:30, Tristan FAURE wrote: >>> >>> Oops 🤐 >>> Sorry I will test it. Thank you very much >>> >>> Le ven. 18 janv. 2019 à 09:21, Carlos S

Re: kubernetes-plugin: containertemplate with shell-script in entrypoint

2017-03-17 Thread Carlos Sanchez
On Fri, Mar 17, 2017 at 12:40 PM, 'Sascha Vujevic' via Jenkins Users < jenkinsci-users@googlegroups.com> wrote: > Hello developers, > > i don't know if i use the kubernetes-plugin correct: > My jenkinsfile looks like: > > podTemplate(label: 'mypod', containers: [ > containerTemplate(name:

Re: when will the docker jenkins be at LTS version?

2017-04-03 Thread Carlos Sanchez
as you said) > it is running Jenkins 2.32.3. > > I believe Carlos Sanchez (and others) control the publishing of official > images to that location, but I'm not 100% sure of that. The 2.32.3 image > was pushed to that location only 3 days ago, so I'm not sure of the g

Re: podTemplate with GKE

2017-05-24 Thread Carlos Sanchez
First, what does it mean "it doesn't work"? Have you checked the Jenkins logs? You can find examples at https://github.com/jenkinsci/kubernetes-plugin On Wed, May 24, 2017, 09:39 Philippe Fuentes wrote: > Hi everybody, > I've been strugleling for a while trying to add an additional podTemplate

Re: How to use podTemplate in a declarative pipeline with the kubernetes-plugin.

2017-08-10 Thread Carlos Sanchez
It is not yet possible. Volumes would need to be added to the class https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/KubernetesDeclarativeAgent.java On Thu, Aug 10, 2017 at 9:22 AM, Vincent Heet wrote: > Hi, > > I configure

Re: The format of key of containerEnvVar within Jenkins Kubernetes Plugin

2017-08-10 Thread Carlos Sanchez
You can not use dots in an environment variable https://kubernetes.io/docs/api-reference/v1.6/#envvar-v1-core a valid C identifier must start with alphabetic character or '_', followed by a string of alphanumeric characters or '_' On Wed, Aug 9, 2017 at 9:18 AM, WANG, YAN-HONG wrote: > Hell

Re: Using Secrets as "environment variables" in containerTemplate of jenkins-kubernetes-plugin

2017-08-10 Thread Carlos Sanchez
There is a PR for it https://github.com/jenkinsci/kubernetes-plugin/pull/162 On Thu, Aug 10, 2017 at 9:15 PM, YAN-HONG WANG wrote: > Hi, > > In jenkins-kubernetes-plugin, is there any syntax that support using *Secrets > as environment variables* in *containerTemplate*? > > I just saw something

Re: How to use podTemplate in a declarative pipeline with the kubernetes-plugin.

2017-08-11 Thread Carlos Sanchez
fix my issue? And I'm not sure why you mention volumes, volumes would then > be supported from the PodTemplate if I understand this correctly? > > > On Thursday, August 10, 2017 at 10:27:14 AM UTC+2, Carlos Sanchez wrote: >> >> It is not yet possible. Volumes would need to

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-11 Thread Carlos Sanchez
Have you tried? On Fri, Aug 11, 2017, 12:14 WANG, YAN-HONG wrote: > Hello all, > > I saw the tutorial with jenkins-kubernetes-plugin. > https://github.com/jenkinsci/kubernetes-plugin > > The examples of containerTemplate are all created in the *beginning *of > groovy file. > And the *image name

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-14 Thread Carlos Sanchez
bled: true) ]* > > container( "*db*" ) { > sh "psql --host=127.0.0.1 --dbname=$project --echo-all > --command='SELECT timestamp FROM info'" > } > } > } > } > } > > And I got the error message re

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-14 Thread Carlos Sanchez
e of podTemplate. >> >> How could I *create* a container in the *execution of pipeline*? >> And that container can also *stay* in the *same* pod. >> Is there some other *syntax* or some *container creation function* could >> be applied in *node area*? >> >> Tha

Re: Using Secrets as "environment variables" in containerTemplate of jenkins-kubernetes-plugin

2017-08-16 Thread Carlos Sanchez
will be in 0.13 On Wed, Aug 16, 2017 at 2:54 PM, YAN-HONG WANG wrote: > Hello Carlos: > > Is method "*secretEnvVar*" already in *Kubernetes plugin 0.12*? Or that > will be released in nearly future *0.13*? > > Because I got the error message like this ... > > *java.lang.NoSuchMethodError: No suc

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-16 Thread Carlos Sanchez
eb YAN-HONG WANG: >> >> Hello Carlos, >> >> Thanks for your hint. >> I will try to create new container in other new pod. >> >> Hong >> >> Am Montag, 14. August 2017 21:20:03 UTC+2 schrieb Carlos Sanchez: >>> >>> You can not a

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-18 Thread Carlos Sanchez
eation. > And then that container image will be established in the "*build stage*" > of pipeline execution. > > So that is why I cannot let this containerTemplate *claimed in the > beginning* of *Pod Definition*. > > Best regards, > Hong > > 2017-08-16 17:01

Re: Kubernetes Plugin

2017-08-24 Thread Carlos Sanchez
I've seen it reported before. Check your pod logs, events and exit codes On Thu, Aug 24, 2017 at 6:35 PM, Pedro Januário wrote: > Hi, > > I am using Jenkins Pipeline with Kubernetes Plugin and doing something > really simple just to build a container and run the container to execute > the tests

Re: Creating Jenkins slaves using kubernetes-plugin that restart on node failures

2017-08-29 Thread Carlos Sanchez
It doesn't restart the agents because as soon as the agent crashes the build will fail. So there is no point in restarting them On Tue, Aug 29, 2017 at 5:30 PM, Cooper99 wrote: > I am new to Jenkins so this may be a simple question. I am using the > kubernetes-plugin to dynamically create Jenki

Re: No credentials/secrets pulled from master into PodTemplate/ContainerTemplate by Jenkins Kubernetes Plugin during pipeline execution?

2017-09-03 Thread Carlos Sanchez
To pull images from private registries you need the imagePullSecrets option (not yet released for pipeline, will be in 1.0) For credentials you would need to do something with them, ie. put them in an environment variable and then use it in the containers. This has also been improved/fixed for 1.0

Re: help with kubernetes jenkins plugin setup

2017-09-04 Thread Carlos Sanchez
On Mon, Sep 4, 2017 at 4:57 PM, Alex B wrote: > I am trying to setup Jenkins to use Kubernetes for build agents on Azure. > Right now I have an instance of Jenkins running in a VM and an instance of > Kubernetes setup in Azure using Azure container service. > > My Jenkins instance is working and

Re: Jenkins global configuration after container starts

2017-09-13 Thread Carlos Sanchez
check the jenkins helm chart, it is doing that already On Wed, Sep 13, 2017 at 11:01 AM, robert tingirica < tingirica.rob...@gmail.com> wrote: > Hello, > > We are using Jenkins in our environment with the kubernetes plugin. We are > currently configuring credentials and creating jobs using the AP

Re: Jenkins global configuration after container starts

2017-09-22 Thread Carlos Sanchez
ailable in jenkins global configuration > > Kind regards > > > On Wednesday, 13 September 2017 11:28:21 UTC+2, Carlos Sanchez wrote: >> >> check the jenkins helm chart, it is doing that already >> >> On Wed, Sep 13, 2017 at 11:01 AM, robert tingirica > &g

Re: Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked.

2017-10-03 Thread Carlos Sanchez
That means you don't have the right RBAC roles setup for the default SA in kubernetes. By default you get no permissions On Mon, Oct 2, 2017 at 3:38 PM, WANG, YAN-HONG wrote: > Hi > > I meet a error message while I tried "*Test Connection*" > > *Error connecting to https://kubernetes.default.svc

Re: Failed to connect to http://jenkins.build-env.svc.cluster.local:8080/tcpSlaveAgentListener/: jenkins.build-env.svc.cluster.local

2017-10-05 Thread Carlos Sanchez
you are correct your kubernetes DNS can't resolve the name, assuming you have a service jenkins in the build-env namespace On Thu, Oct 5, 2017 at 4:09 PM, WANG, YAN-HONG wrote: > Hello, > > My environment: > Jenkins: 2.73.1 > Jenkins plugin (kubernetes: *1.0*). > Kuberntes Server: *v1.7.7* ( One

Re: Kubernetes Plugin - Add ‘Environment Variable’ Button is not functional in Jenkins ‘Configure System’ under ‘Container Template’

2017-11-01 Thread Carlos Sanchez
It's a known issue https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-47112 On Wed, Nov 1, 2017, 16:29 Avi Segev wrote: > > > Versions used: Jenkins ver. 2.60.1, Kubernetes plugin version 1.0 (also > tested on version 1.1). > > > We have a functional dynamically provisioned Jen

Example of a working pod with the kubernetes-ci plugin

2016-11-23 Thread Carlos Sanchez
You can't just jump from a container to another, can only share through network or shared filesystem. http://kubernetes.io/docs/user-guide/pods/ I suggest using the Kubernetes Jenkins plugin that can do exactly what you want using pipeline https://github.com/jenkinsci/kubernetes-plugin/blob/mas

Re: Example of a working pod with the kubernetes-ci plugin

2016-12-18 Thread Carlos Sanchez
an be customized by adding it to the template", but it > seems that I need to include a JNLP image in the pod template so that it > can talk to Jenkins. > > > On Wednesday, November 23, 2016 at 7:12:24 PM UTC-2, Carlos Sanchez wrote: > > You can't just jump from a con

Re: Kubernetes does not show as Cloud Provider

2017-01-25 Thread Carlos Sanchez
It should show, maybe you are missing some plugin dependencies or have dependency conflicts. Check the jenkins log at startup for errors. On Wed, Jan 25, 2017 at 12:11 AM, J wrote: > Hi, > > I'm using the latest version of Jenkins (2.32) and the Kubernetes plugin > (0.10). I've tried re-installi

Re: Kubernetes does not show as Cloud Provider

2017-01-25 Thread Carlos Sanchez
Unsupported major.minor version 52.0 Kubernetes plugin requires Java 8 On Wed, Jan 25, 2017 at 6:28 PM, J wrote: > I did a new install and I see a bunch of warnings all failing to load >> modules and all citing the same major minor version error (highlighted >> below): >> > > > INFO: Jenkins is

  1   2   >