Kubernetes-client: Error occurred while running FullExample

Created on 21 Oct 2020  路  5Comments  路  Source: fabric8io/kubernetes-client

Running with version 4.12.0, full error stack:

shell script io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred. at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64) at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:53) at io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation.edit(RollableScalableResourceOperation.java:163) at io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation.edit(RollableScalableResourceOperation.java:44) at io.fabric8.kubernetes.examples.FullExample.main(FullExample.java:156) Caused by: java.lang.NoSuchMethodException: io.fabric8.kubernetes.api.model.DoneableReplicationController.<init>(io.fabric8.kubernetes.api.model.ReplicationController, io.fabric8.kubernetes.api.builder.Visitor) at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.getDeclaredConstructor(Class.java:2178) at io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation.edit(RollableScalableResourceOperation.java:161) ... 2 more [main] ERROR io.fabric8.kubernetes.examples.FullExample - An error has occurred. io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred. at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64) at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:53) at io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation.edit(RollableScalableResourceOperation.java:163) at io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation.edit(RollableScalableResourceOperation.java:44) at io.fabric8.kubernetes.examples.FullExample.main(FullExample.java:156) Caused by: java.lang.NoSuchMethodException: io.fabric8.kubernetes.api.model.DoneableReplicationController.<init>(io.fabric8.kubernetes.api.model.ReplicationController, io.fabric8.kubernetes.api.builder.Visitor) at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.getDeclaredConstructor(Class.java:2178) at io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation.edit(RollableScalableResourceOperation.java:161) ... 2 more

help wanted

Most helpful comment

Great, would you like to submit a PR with the fix? we can assist you if you need help.

Ok, I would like to, please assign it to me.

All 5 comments

oh, that's not good. I remember we refactored Rolling Update API in like kubectl in https://github.com/fabric8io/kubernetes-client/pull/2272

@dixingxing0 : Does it work when you change rolling update of replicationController like this(L149-151):

                // Update the RC via rolling update with inline builder
                client.replicationControllers().inNamespace("thisisatest").withName("nginx-controller")
                        .rolling().updateImage("nginx:stable-alpine");

Thanks, it works.
// Update the RC via rolling update with inline builder client.replicationControllers().inNamespace("thisisatest").withName("nginx-controller") .rolling().updateImage("nginx:stable-alpine");

Great, would you like to submit a PR with the fix? we can assist you if you need help.

Great, would you like to submit a PR with the fix? we can assist you if you need help.

Ok, I would like to, please assign it to me.

Was this page helpful?
0 / 5 - 0 ratings