hello - for the flink kubernetes operator `apache/...
# troubleshooting
m
hello - for the flink kubernetes operator
apache/flink-kubernetes-operator:1.7.0
we're seeing sometimes when we submit FlinkDeploymentCRDs that the task manager replica count is "magically" set to 0, causing the operator to yell about an invalid definition of the CRD. It's been transient, will try to reproduce, but wanted to know if anyone else say this occur?
Copy code
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PUT at: https://172.20.0.1:443/apis/flink.apache.org/v1beta1/namespaces/{{ some name space }}/flinkdeployments/{{ some deployment name }}. Message: admission webhook "validationwebhook.flink.apache.org" denied the request: TaskManager replicas must be larger than 0. Received status: Status(apiVersion=v1, code=403, details=null, kind=Status, message=admission webhook "validationwebhook.flink.apache.org" denied the request: TaskManager replicas must be larger than 0, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=null, status=Failure, additionalProperties={}).
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.requestFailure(OperationSupport.java:660)
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.requestFailure(OperationSupport.java:640)
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.assertResponseCode(OperationSupport.java:589)
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.lambda$handleResponse$0(OperationSupport.java:549)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source)
	at io.fabric8.kubernetes.client.http.StandardHttpClient.lambda$completeOrCancel$10(StandardHttpClient.java:140)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source)
	at io.fabric8.kubernetes.client.http.ByteArrayBodyHandler.onBodyDone(ByteArrayBodyHandler.java:52)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source)
	at io.fabric8.kubernetes.client.okhttp.OkHttpClientImpl$OkHttpAsyncBody.doConsume(OkHttpClientImpl.java:137)
cc @M C (Mac)
g
You should not set task manager replicas yourself unless using a standalone session cluster
m
@Gyula Fóra understood, in these cases we are not specifying it, but the operator is getting it from "somewhere." It's very transient, but it has happened twice for us now.
What ended up happening today was the CRD failed to deploy a few times, and then just worked without intervention.
Happy to add something like if application mode and task manager replica for whatever reason is set, don't consider it. Versus failing.
g
I literally have never seen this in by now probably hundreds of thousands of deployments . Seems like something is off with your deploy flow / kubernetes api / client. In any case if you would like to open a jira and work on a simple fix , please go ahead :)