[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title João Salavessa commented on JENKINS-60798 Re: Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Vincent Latombe just to confirm that 1.23.3 seems to be working fine. Thanks! Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.7920.1581505020502%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe updated an issue Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: Vincent Latombe Released As: kubernetes 1.23. 2 3 Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.7903.1581501720826%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe updated JENKINS-60798 Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: Vincent Latombe Status: In Review Closed Resolution: Fixed Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.7907.1581501720924%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe commented on JENKINS-60798 Re: Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" João Salavessa should be fixed in 1.23.3 Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.7899.1581501661128%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title João Salavessa edited a comment on JENKINS-60798 Re: Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Running _kubectl_ with the above file I get the below:{{$ kubectl --kubeconfig=.kube4111259011631954122config version}} {{Client Version: version.Info \ {Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:20:18Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}}} {{ * Unable to connect to the server: x509: certificate signed by unknown authority * }} If I add " * _insecure-skip-tls-verify: true_ * " to the file it works as expected:{{$ kubectl --kubeconfig=.kube4111259011631954122config_insecure-skip-tls-verify-true version}} {{Client Version: version.Info \ {Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:20:18Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}}} {{Server Version: version.Info \ {Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:11:50Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}}} Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title João Salavessa commented on JENKINS-60798 Re: Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Running kubectl with the above file I get the below: $ kubectl --kubeconfig=.kube4111259011631954122config version Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:20:18Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} Unable to connect to the server: x509: certificate signed by unknown authority If I add "insecure-skip-tls-verify: true" to the file it works as expected: $ kubectl --kubeconfig=.kube4111259011631954122config_insecure-skip-tls-verify-true version }}{{Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:20:18Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:11:50Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title João Salavessa edited a comment on JENKINS-60798 Re: Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Running _kubectl_ with the above file I get the below:{{$ kubectl --kubeconfig=.kube4111259011631954122config version}}{{Client Version: version.Info \ {Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:20:18Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}}}{{Unable to connect to the server: x509: certificate signed by unknown authority}} If I add "_insecure-skip-tls-verify: true_" to the file it works as expected:{{$ kubectl --kubeconfig=.kube4111259011631954122config_insecure-skip-tls-verify-true version}}{{ }}{{ Client Version: version.Info \ {Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:20:18Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}}}{{Server Version: version.Info \ {Major:"1", Minor:"15", GitVersion:"v1.15.6", GitCommit:"7015f71e75f670eb9e7ebd4b5749639d42e20079", GitTreeState:"clean", BuildDate:"2019-11-13T11:11:50Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}}} Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title João Salavessa commented on JENKINS-60798 Re: Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Tested: job fails with the same message. The "current-context" is now set correctly but the cluster's "insecure-skip-tls-verify" is not present (and I suppose kubectl defaults that to false). Generated file below: $ cat .kube4111259011631954122config --- clusters: - cluster: {{ server: "https://api.internal.k8s.com"}} {{ name: "k8s"}} contexts: - context: {{ cluster: "k8s"}} {{ user: "cluster-admin"}} {{ name: "k8s"}} current-context: "k8s" users: - name: "cluster-admin" {{ user:}} {{ as-user-extra: {}}} {{ password: ".."}} {{ username: "jenkins"}} Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.9761.1580570400197%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe commented on JENKINS-60798 Re: Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" João Salavessa could you try with https://repo.jenkins-ci.org/incrementals/org/jenkinsci/plugins/kubernetes-credentials/0.6.1-rc83.76c66431124a/ ? Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.9755.1580567520277%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe updated JENKINS-60798 Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: Vincent Latombe Status: In Progress Review Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.9752.1580567280524%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe started work on JENKINS-60798 Change By: Vincent Latombe Status: Reopened In Progress Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.9749.1580567280477%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe updated an issue Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: Vincent Latombe Component/s: kubernetes-credentials-plugin Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.9743.1580567040305%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe commented on JENKINS-60798 Re: Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" I probably read the initial report too quickly. The problem seems to be no current context is set. Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.9746.1580567040344%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title João Salavessa reopened an issue Just tested this with version 1.23.2 and issue is still happening. The only difference is the error message in the jenkins job (the generated config file has the same issues). [...] Building in workspace /var/jenkins_home/workspace/backups $ kubectl version ERROR: Failed to run kubectl version. Returned status code 1. Finished: FAILURE Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: João Salavessa Resolution: Fixed Status: Resolved Reopened Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe updated JENKINS-60798 Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: Vincent Latombe Status: Fixed but Unreleased Resolved Released As: kubernetes 1.23.2 Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.9594.1580491260325%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe updated JENKINS-60798 Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: Vincent Latombe Status: In Review Fixed but Unreleased Resolution: Fixed Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.7988.1580288160605%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe updated JENKINS-60798 Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: Vincent Latombe Status: In Progress Review Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.5095.1579877941969%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe assigned an issue to Vincent Latombe Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: Vincent Latombe Assignee: Vincent Latombe Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.5092.1579877941730%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title Vincent Latombe started work on JENKINS-60798 Change By: Vincent Latombe Status: Open In Progress Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204126.1579192576000.5089.1579877880378%40Atlassian.JIRA.
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title João Salavessa updated an issue Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Change By: João Salavessa {{ In latest release (1.23.0) I'm getting the below error while trying to use the "*Setup Kubernetes CLI (kubectl)*" in a job where field "_Certificate of authority_" is empty and field "_Credentials_" is populated from type "_Username and password_": }} { {}}{ code :java }[...]Building in workspace /var/jenkins_home/workspace/backups$ kubectl versionFATAL: Failed to run kubectl version 1java.io.IOException: Failed to run kubectl version 1at org.csanchez.jenkins.plugins.kubernetes.KubectlBuildWrapper.setUp(KubectlBuildWrapper.java:94)at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:146)at hudson.model.Build$BuildExecution.doRun(Build.java:157)at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)at hudson.model.Run.execute(Run.java:1853)at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)at hudson.model.ResourceController.execute(ResourceController.java:97)at hudson.model.Executor.run(Executor.java:427)Finished: FAILURE{code}The previous version (_1.22.5_) works fine and after downgrading all jobs started to work again.This happened in two independent Jenkins boxes running the latest LTS Jenkins ver. 2.204.1. After further investigation, the issue seems to be related to kubernetes config file setup. Although I didn't specify a certificate, the property _*insecure-skip-tls-verify*_ is set to *_false_*, plus the *_current-context_* is *_not set._* Sample generated file below: {code}$ cat .kube2280516965942825275config---clusters:- cluster: insecure-skip-tls-verify: false server: "https://api.k8s-cluster.dummy.com" name: "k8s"contexts:- context: cluster: "k8s" user: "cluster-admin" name: "k8s"users:- name: "cluster-admin" user: as-user-extra: {} password: "X" username: "jenkins"{code} Add Comment
[JIRA] (JENKINS-60798) Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1"
Title: Message Title João Salavessa created an issue Jenkins / JENKINS-60798 Setup Kubernetes CLI (kubectl) error: "FATAL: Failed to run kubectl version 1" Issue Type: Bug Assignee: Unassigned Components: kubernetes-plugin Created: 2020-01-16 16:36 Environment: Kubernetes 1.15.6 Kubernetes-plugin 1.23.0 Jenkins LTS 2.204.1 Priority: Blocker Reporter: João Salavessa In latest release (1.23.0) I'm getting the below error while trying to use the "Setup Kubernetes CLI (kubectl)" in a job where field "Certificate of authority" is empty and field "Credentials" is populated from type "Username and password": {{}} [...] Building in workspace /var/jenkins_home/workspace/backups $ kubectl version FATAL: Failed to run kubectl version 1 java.io.IOException: Failed to run kubectl version 1 at org.csanchez.jenkins.plugins.kubernetes.KubectlBuildWrapper.setUp(KubectlBuildWrapper.java:94) at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:146) at hudson.model.Build$BuildExecution.doRun(Build.java:157) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1853) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:427) Finished: FAILURE The previous version (1.22.5) works fine and after downgrading all jobs started to work again. This happened in two independent Jenkins boxes running the