kubernetes-cd-plugin icon indicating copy to clipboard operation
kubernetes-cd-plugin copied to clipboard

"Invalid DER: Value is not an integer" when using Docker EE Kube.yml configuration

Open FireDrunk opened this issue 6 years ago • 7 comments

I'm trying to get the kubernetes-cd plugin to deploy to Docker EE. The Docker EE environment creates a kube.yml file which is preconfigured for the Kubernetes cluster inside Docker EE. When trying to deploy, I'm getting this error: https://github.com/kubernetes-client/java/issues/135 This seems to be fixed by: https://github.com/kubernetes-client/java/pull/198

But I can't seemd to find in which build of Kubernets-client this fix has been implemented. Current version of kubernetes-client used by kubernetes-cd plugin seems to be 3.1.10 which came around after the merge of that issue, but I'm still having this error.

Kubernetes-client 3.1.12 has been released in the meantime, perhaps a version bump would fix this?

FireDrunk avatar Jul 20 '18 07:07 FireDrunk

@FireDrunk You are correct it appears the embedded Kubernetes Client within this plugin only supports RSA certs not EC certs.

A work around today for Docker EE would be to use a Service Account's Token within a Kube Config file instead of a Users client-certificate-data and client-key-data.

ollypom avatar Jul 20 '18 15:07 ollypom

Hi @FireDrunk , Sorry for the late reply, indeed this plugin depends on fabric8io client instead of kubernetes one. I am now working on migrating the sdk to official one(see #67 ), and when it is down, your problem will be solved.

gavinfish avatar Sep 11 '18 09:09 gavinfish

Hi folks, Any update on this? We've hit the same problem

rhysjtevans avatar Sep 09 '19 15:09 rhysjtevans

The latest version has switched to the official kubernetes client.

gavinfish avatar Sep 09 '19 15:09 gavinfish

Thanks @gavinfish, we've deployed latest versions of kubernetes-client plugin in jenkins. Still facing above, any thoughts in that case?

rhysjtevans avatar Sep 09 '19 16:09 rhysjtevans

@rhysjtevans Which configuration type do you use? I suggest you use kubeconfig file instead of the deprecated ones. If you have already used kubeconfig, is it possible for you provide a invalid setting to let me reproduce this problem on my side?

gavinfish avatar Sep 10 '19 02:09 gavinfish

@FireDrunk You are correct it appears the embedded Kubernetes Client within this plugin only supports RSA certs not EC certs.

A work around today for Docker EE would be to use a Service Account's Token within a Kube Config file instead of a Users client-certificate-data and client-key-data.

@ollypom I don't understand your workaround suggestion. what goes into the kube server certificate key field and what type of credentials did you create for the connection? I used the client bundle to create a pkcs12 key which I added as a "Certificate" but unsure what to put in the server certificate key area, always getting this error.

maquino1985 avatar Dec 10 '19 22:12 maquino1985