use of io.kubernetes.client.PodLogs in project java by kubernetes-client.
the class LogsExample method main.
public static void main(String[] args) throws IOException, ApiException, InterruptedException {
ApiClient client = Config.defaultClient();
Configuration.setDefaultApiClient(client);
CoreV1Api coreApi = new CoreV1Api(client);
PodLogs logs = new PodLogs();
V1Pod pod = coreApi.listNamespacedPod("default", "false", null, null, null, null, null, null, null, null).getItems().get(0);
InputStream is = logs.streamNamespacedPodLog(pod);
ByteStreams.copy(is, System.out);
}
Aggregations