Skip to content

Can not read Protobuf Data #7364

@chenyuzhi459

Description

@chenyuzhi459

I am using kubernetes-client v7.3.1, when I setting customHeaders in config to use protobuf

 customHeaders.put("Accept", "application/vnd.kubernetes.protobuf");

the client displays the error:

Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Error executing: GET at: https://10.91.18.69:10285/api/v1/namespaces/gdc-gdc-sa/pods?labelSelector=app%3Dtest-mint1-protobuf-v15%2Ccomponent%3Dtaskmanager%2Ctype%3Dflink-native-kubernetes. Cause: special characters are not allowed
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.requestException(OperationSupport.java:655) ~[flink-dist-1.15.2-GDC1.0-SNAPSHOT.jar:1.15.2-GDC1.0-SNAPSHOT]
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.requestException(OperationSupport.java:659) ~[flink-dist-1.15.2-GDC1.0-SNAPSHOT.jar:1.15.2-GDC1.0-SNAPSHOT]
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.lambda$handleResponse$0(OperationSupport.java:558) ~[flink-dist-1.15.2-GDC1.0-SNAPSHOT.jar:1.15.2-GDC1.0-SNAPSHOT]
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2079) ~[?:?]
	at io.fabric8.kubernetes.client.http.StandardHttpClient.lambda$completeOrCancel$10(StandardHttpClient.java:141) ~[flink-dist-1.15.2-GDC1.0-SNAPSHOT.jar:1.15.2-GDC1.0-SNAPSHOT]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2079) ~[?:?]
	at io.fabric8.kubernetes.client.http.ByteArrayBodyHandler.onBodyDone(ByteArrayBodyHandler.java:51) ~[flink-dist-1.15.2-GDC1.0-SNAPSHOT.jar:1.15.2-GDC1.0-SNAPSHOT]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2079) ~[?:?]
	at io.fabric8.kubernetes.client.okhttp.OkHttpClientImpl$OkHttpAsyncBody.doConsume(OkHttpClientImpl.java:134) ~[flink-dist-1.15.2-GDC1.0-SNAPSHOT.jar:1.15.2-GDC1.0-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	at java.lang.Thread.run(Thread.java:829) ~[?:?]

How to read protobuf data using the kubernetes-client?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions