[JIRA] (JENKINS-53921) kubernetes-plugin - declarative pipeline - option to set kubernetes master url
Title: Message Title Carlos Sanchez closed an issue as Incomplete Jenkins / JENKINS-53921 kubernetes-plugin - declarative pipeline - option to set kubernetes master url Change By: Carlos Sanchez Status: Open Closed Resolution: Incomplete Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-53921) kubernetes-plugin - declarative pipeline - option to set kubernetes master url
Title: Message Title Carlos Sanchez commented on JENKINS-53921 Re: kubernetes-plugin - declarative pipeline - option to set kubernetes master url can you paste the stack trace and logs ? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-53921) kubernetes-plugin - declarative pipeline - option to set kubernetes master url
Title: Message Title Lee McClintock commented on JENKINS-53921 Re: kubernetes-plugin - declarative pipeline - option to set kubernetes master url Does it make sense that we'd also be seeing this error when adding the yaml """ snippet to a podTemplate? We have a pipeline that is running for both OCP 3.9 and an AKS cluster on 1.11.3. When we add the yaml snippet (with any content, primarily yaml: """ spec: securityContext: runAsUser: 2 fsGroup: 0 """, it instantly fails when trying to use the OpenShift cloud with java.net.UnknownHostException: kubernetes.default.svc: Name or service not known .. However when choosing the AKS cloud (or without the yaml snippet on AKS OR OCP), it works succesfully. Just wondering if this appears to be the same issue. Our jenkins is running external to any of the clusters on a standalone install. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-53921) kubernetes-plugin - declarative pipeline - option to set kubernetes master url
Title: Message Title Sandeep Zachariah commented on JENKINS-53921 Re: kubernetes-plugin - declarative pipeline - option to set kubernetes master url I guess we could take the Kubernetes URL configured in the plugin and call fabric8 api DefaultKubernetesClient(String masterUrl) instead of making a call to DefaultKubernetesClient(). Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-53921) kubernetes-plugin - declarative pipeline - option to set kubernetes master url
Title: Message Title Sandeep Zachariah created an issue Jenkins / JENKINS-53921 kubernetes-plugin - declarative pipeline - option to set kubernetes master url Issue Type: Bug Assignee: Carlos Sanchez Components: kubernetes-plugin Created: 2018-10-05 12:22 Environment: Jenkins 2.121.2 Kubernetes Plugin 1.12.6 Priority: Minor Reporter: Sandeep Zachariah Hi, My jenkins master is running outside of kubernetes cluster. In the below declarative pipeline script, is there an option to set kubernetes master url. pipeline { agent { kubernetes { label 'mypod' defaultContainer 'jnlp' yaml """ apiVersion: v1 kind: Pod metadata: labels: some-label: some-label-value spec: containers: - name: maven image: maven:alpine command: - cat tty: true - name: busybox image: busybox command: - cat tty: true """ } } stages { stage('Run maven') { steps { container('maven') { sh 'mvn -version' } container('busybox') { sh '/bin/busybox' } } } } } Why because, https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplateUtils.java makes call to fabric8 DefaultKubernetesClient() which defaults to kubernetes.default.svc as the master url. So I end up in error "java.net.UnknownHostException: kubernetes.default.svc: Name or service not known." How can I set kubernetes master url in this case ? Thanks