You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Edgar H <ka...@gmail.com> on 2023/05/08 12:23:48 UTC

Mounting files into native k8s Flink pods

Hi all!Running Flink on k8s (native, not using the operator) I was trying
to mount Hadoop configuration files into a certain directory within the
pods but I can't manage to do so.My existing deployment consists in a Job
spec which launches a .sh  file that will trigger the flink run-application
bit, that will launch a Pod that will subsequently trigger the TMs and all
the related stuff.At first I tried to mount the files as a volume within
the Job spec via flink-main-container, but it was unsuccessful and none was
mounted in the resultant Pod launched by the Job. Later I tried with the
example
https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/native_kubernetes/#example-of-pod-template
 but can't really get it to work... As of now, I've got no Pod definitions
since those are automatically created by Flink when launching the
previously mentioned Job.The way I'm seeing adding a Pod template is that
it will be decoupled from the one launched by the Job so they won't be
related in any way, am I right? Mainly because of the initContainer bit.Is
there any other way to mount files into the pods launched by a Job? If this
is the only way, how should I spec my Pod template to do so?