-
Bug
-
Resolution: Not A Defect
-
Major
-
Jenkins 2.156
Kubernetes-cli 1.4.0
Kubernetes-credentials 0.4.0
I setup a kubernetes credentials with raw content:
When I use it referring only with the credentials-id as follows:
steps { withKubeConfig([credentialsId: 'kubernetes-mkp-int' , ]) { sh 'kubectl get pods' sh 'helm get mkp-int --tiller-namespace mkp-int' } }
It fails:
{[Pipeline] withKubeConfig$ kubectl config set-cluster k8s --server=null --insecure-skip-tls-verify=true Cluster "k8s" set. [Pipeline] // withKubeConfig[Pipeline] } [Pipeline] // withEnv[Pipeline] } [Pipeline] // node [Pipeline] }[Pipeline] // stage[Pipeline] } [Pipeline] // withEnv[Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node[Pipeline] End of PipelineERROR: Unsupported Credentials type com.microsoft.jenkins.kubernetes.credentials.KubeconfigCredentials Finished: FAILURE
In the workspace, a kubeconfig file has been created but it has nothing in common with my credentials defined.
cat .kube6838469646141525001config apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true server: "null" name: k8s contexts: [] current-context: "" kind: Config preferences: {} users: []
I have one kubernetes credentials added and I have been tested that changing the
I'm doing something wrong or it's a bug?