What is the latest version of kubernetes-client that support K8S 1.1 version

248 views
Skip to first unread message

Henry Saputra

unread,
May 18, 2016, 6:14:49 PM5/18/16
to fabric8
Hi,

I am trying to update my client so I would like to know what is latest version that work with K8S version 1.1 of the API server?

I am not sure the backward compatible story of K8S 1.1 to 1.2 ?


Thanks,

Henry

James Strachan

unread,
May 19, 2016, 4:27:35 AM5/19/16
to Henry Saputra, fabric8
the latest kubernetes-client should work OK with k8s 1.0 or later as the schema is all v1 and the core stuff (Services / ReplicationControllers / Pods) haven't changed since then. Its just be some resource types are not supported on earlier k8s versions. e.g. ConfigMaps are only available on 1.2

--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
James
-------
Red Hat

Twitter: @jstrachan
Email: james.s...@gmail.com
Blog: https://medium.com/@jstrachan/

open source microservices platform

Henry Saputra

unread,
May 19, 2016, 10:39:04 AM5/19/16
to James Strachan, fabric8
Unfortunately, that was not the case.

Using the latest version of client against k8s 1.0 I got this error log :


2016-05-18 18:12:01 thread:[OkHttp http://localhost:8080/api/v1/namespaces/owner-bigminion-1463620318763-1544803905/services?fieldSelector=metadata.name%3Dspark-master&resourceVersion=167&watch=true] ERROR i.f.k.c.d.i.WatchConnectionManager$1 - Exec Failure: HTTP:400. Message:Bad Request
java.net.ProtocolException: Expected HTTP 101 response but was '400 Bad Request'
at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:123)
at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:40) com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:98) 

But no exception thrown, which means kubernetes client somehow eat the exception.

- Henry

James Strachan

unread,
May 19, 2016, 10:55:17 AM5/19/16
to Henry Saputra, fabric8
What java code generated that exception - I guess its a service watch by name right? 

Can you get/list the services? Can you watch all the services? It might just be named watches changed the REST API on 1.0 or something?

Jimmi Dyson

unread,
May 19, 2016, 11:07:00 AM5/19/16
to Henry Saputra, James Strachan, fabric8
The v1 watch API has been stable since Kubernetes 1.0 so I'm a bit confused why the server is returning 400 Bad Request. Error messages in Kubernetes 1.0 weren't very good (they've improved since then) so it's a bit hard to diagnose. But I would expect this combination to work. If you enable request tracing by setting the log level to TRACE you should see the full trace of all request/responses & see if there's any more details in there.

Ioannis Canellos

unread,
May 19, 2016, 11:12:06 AM5/19/16
to fabric8, henry....@gmail.com, james.s...@gmail.com
We still need to do something about swallowing the exception.

For the exec parts (we waited until open or failure are called) so that we can sync throw failure exception back to the caller (that would be otherwise lost).
We should do the same for watches....


On Thursday, May 19, 2016 at 6:07:00 PM UTC+3, Jimmi Dyson wrote:
The v1 watch API has been stable since Kubernetes 1.0 so I'm a bit confused why the server is returning 400 Bad Request. Error messages in Kubernetes 1.0 weren't very good (they've improved since then) so it's a bit hard to diagnose. But I would expect this combination to work. If you enable request tracing by setting the log level to TRACE you should see the full trace of all request/responses & see if there's any more details in there.

On Thu, 19 May 2016 at 15:39 Henry Saputra <henry....@gmail.com> wrote:
Unfortunately, that was not the case.

Using the latest version of client against k8s 1.0 I got this error log :


2016-05-18 18:12:01 thread:[OkHttp http://localhost:8080/api/v1/namespaces/owner-bigminion-1463620318763-1544803905/services?fieldSelector=metadata.name%3Dspark-master&resourceVersion=167&watch=true] ERROR i.f.k.c.d.i.WatchConnectionManager$1 - Exec Failure: HTTP:400. Message:Bad Request
java.net.ProtocolException: Expected HTTP 101 response but was '400 Bad Request'
at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:123)
at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:40) com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:98) 

But no exception thrown, which means kubernetes client somehow eat the exception.

- Henry


On Thursday, May 19, 2016, James Strachan <james.s...@gmail.com> wrote:
the latest kubernetes-client should work OK with k8s 1.0 or later as the schema is all v1 and the core stuff (Services / ReplicationControllers / Pods) haven't changed since then. Its just be some resource types are not supported on earlier k8s versions. e.g. ConfigMaps are only available on 1.2
On 18 May 2016 at 23:14, Henry Saputra <henry....@gmail.com> wrote:
Hi,

I am trying to update my client so I would like to know what is latest version that work with K8S version 1.1 of the API server?

I am not sure the backward compatible story of K8S 1.1 to 1.2 ?


Thanks,

Henry

--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
James
-------
Red Hat

Twitter: @jstrachan
Email: james.s...@gmail.com
Blog: https://medium.com/@jstrachan/

open source microservices platform

Henry Saputra

unread,
May 19, 2016, 1:38:52 PM5/19/16
to James Strachan, fabric8
Yes, that is correct. The problem is that we don't know which code actually throwing the exception bc it never propagate back to our code flow =(

Ioannis Canellos

unread,
May 19, 2016, 1:44:21 PM5/19/16
to Henry Saputra, James Strachan, fabric8
This is already in place as of https://github.com/fabric8io/kubernetes-client/commit/8e50e359c44609be1f07eddc6d34b9bd28abf830

which means that should be also available from 1.3.84 onward.

Ioannis Canellos

Twitter: iocanel

Henry Saputra

unread,
May 19, 2016, 1:48:51 PM5/19/16
to Ioannis Canellos, James Strachan, fabric8
Ah interesting, thanks,

I wonder why it is not being caught. Let me check it again.

- Henry
Reply all
Reply to author
Forward
0 new messages