How to use Watch APIs in Kubernetes

7/31/2017

How to implement watch API using OkHttp and Retrofit in Java. Do I have to use WebSockets for this to implement?

-- ghost
docker
kubernetes

1 Answer

8/2/2017

If you haven't already done so, running kubectl --v=100 get -w events will show you the equivalent pseudo-curl command that kubectl is invoking on your behalf

But if the behavior of kubectl logs is any indicator, yes, I would expect websockets are likely involved

-- mdaniel
Source: StackOverflow