Issue in deploying Flink application in AKS 1.21

Hi Team,

We are working with Flink application (1.13.2) deployed in AKS (1.19) and it is working fine. At present we have upgraded the AKS version to 1.21 and deployed the same Flink application but facing the below issue during start up and the pods are going to crashloopback because of this error.

Could you please let us know is it something to check with compatibility? Thanks.

Cluster information:

Kubernetes version: 1.21

Error Log:

Caused by: java.lang.NoClassDefFoundError: org/apache/flink/client/program/OptimizerPlanEnvironment$ProgramAbortException
at cloudflow.flink.FlinkStreamlet.ClusterFlinkJobExecutor$lzycompute$1(FlinkStreamlet.scala:279) ~[?:?]
at cloudflow.flink.FlinkStreamlet.ClusterFlinkJobExecutor(FlinkStreamlet.scala:279) ~[?:?]
at cloudflow.flink.FlinkStreamlet.createStreamExecutionEnvironment(FlinkStreamlet.scala:136) ~[?:?]
at cloudflow.flink.FlinkStreamlet.$anonfun$createContext$1(FlinkStreamlet.scala:86) ~[?:?]
at scala.util.Success.$anonfun$map$1(Try.scala:251) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at scala.util.Success.map(Try.scala:209) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at cloudflow.flink.FlinkStreamlet.createContext(FlinkStreamlet.scala:80) ~[?:?]
at cloudflow.flink.FlinkStreamlet.createContext(FlinkStreamlet.scala:71) ~[?:?]
at cloudflow.streamlets.Streamlet.run(Streamlet.scala:105) ~[?:?]
at cloudflow.runner.Runner$.run(Runner.scala:67) ~[?:?]
at cloudflow.runner.Runner$.main(Runner.scala:45) ~[?:?]
at cloudflow.runner.Runner.main(Runner.scala) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_292]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292]
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at org.apache.flink.client.deployment.application.ApplicationDispatcherBootstrap.runApplicationEntryPoint(ApplicationDispatcherBootstrap.java:242) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
… 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.flink.client.program.OptimizerPlanEnvironment$ProgramAbortException
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_292]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_292]
at org.apache.flink.util.FlinkUserCodeClassLoader.loadClassWithoutExceptionHandling(FlinkUserCodeClassLoader.java:64) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at org.apache.flink.util.ChildFirstClassLoader.loadClassWithoutExceptionHandling(ChildFirstClassLoader.java:65) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at org.apache.flink.util.FlinkUserCodeClassLoader.loadClass(FlinkUserCodeClassLoader.java:48) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_292]
at cloudflow.flink.FlinkStreamlet.ClusterFlinkJobExecutor$lzycompute$1(FlinkStreamlet.scala:279) ~[?:?]
at cloudflow.flink.FlinkStreamlet.ClusterFlinkJobExecutor(FlinkStreamlet.scala:279) ~[?:?]
at cloudflow.flink.FlinkStreamlet.createStreamExecutionEnvironment(FlinkStreamlet.scala:136) ~[?:?]
at cloudflow.flink.FlinkStreamlet.$anonfun$createContext$1(FlinkStreamlet.scala:86) ~[?:?]
at scala.util.Success.$anonfun$map$1(Try.scala:251) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at scala.util.Success.map(Try.scala:209) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at cloudflow.flink.FlinkStreamlet.createContext(FlinkStreamlet.scala:80) ~[?:?]
at cloudflow.flink.FlinkStreamlet.createContext(FlinkStreamlet.scala:71) ~[?:?]
at cloudflow.streamlets.Streamlet.run(Streamlet.scala:105) ~[?:?]
at cloudflow.runner.Runner$.run(Runner.scala:67) ~[?:?]
at cloudflow.runner.Runner$.main(Runner.scala:45) ~[?:?]
at cloudflow.runner.Runner.main(Runner.scala) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_292]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292]
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
at org.apache.flink.client.deployment.application.ApplicationDispatcherBootstrap.runApplicationEntryPoint(ApplicationDispatcherBootstrap.java:242) ~[flink-dist_2.12-1.13.2.jar:1.13.2]
… 10 more