This is almost certainly a misuse/misread of the API on my end but was wondering if I could get some guidance on this:
This is my code snippet/attempt at creating a watcher to list all namespace events in my cluster:
Call v1NamespaceListCall = coreV1Api.listEventForAllNamespacesCall(BOOKMARK_ENABLED, null,
null, null, null, NO_PRETTY_PRINT, null, null, WATCH_ENABLED, null);
Watch<V1Event> watch = Watch.createWatch(coreApi.getApiClient(), v1NamespaceListCall,
new TypeToken<Response<V1Event>>(){}.getType());
I’m getting an API exception when creating a Watcher:Caused by: io.kubernetes.client.openapi.ApiException: at io.kubernetes.client.util.Watch.createWatch(Watch.java:105) without much more detail in the stack trace. Am I creating a Watch of the incorrect type? I have a similar pod watcher that works fine but can’t seem to be getting it to work for namespace events across a cluster.
I tried to read the documentation through and play around with different watchers
Brian Lau is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.