bilal-07 opened a new issue, #146:
URL: https://github.com/apache/flink-shaded/issues/146
Issue with Flink Application Mode `args` – Custom Command Not Executing as
Expected
**Description:**
* **Apache Flink Version:** 1.20.1
* **Java Version:** 17
* **Platform:** AWS EKS (Kubernetes)
I'm encountering an issue with **Apache Flink Application Mode** when trying
to run a side process (`filebeat`) inside the TaskManager container. I am not
using a Kubernetes manifest—I'm launching the Flink cluster using the Flink CLI
with the `run-application` command.
Here is the exact command I'm using:
```bash
./bin/flink run-application \
--detached \
--parallelism 2 \
--target kubernetes-application \
-Dkubernetes.cluster-id=loyatly-flink-app-01 \
-Dkubernetes.jobmanager.exit-on-job-finished=false \
-Dkubernetes.jobmanager.exit-on-fatal-error=false \
-Dkubernetes.container.image.ref=2211111114.dkr.ecr.us-east-2.amazonaws.com/flink:v1
\ #(Custom Image Build)
-Dkubernetes.container.image.pull-policy=Always \
-Dkubernetes.taskmanager.entrypoint.args=/bin/sh -c 'sleep 10 &&
/usr/bin/filebeat -e -c /etc/filebeat/filebeat.yml > /tmp/filebeat.log 2>&1 &
exec /docker-entrypoint.sh taskmanager' \
-Dkubernetes.jobmanager.cpu=0.7 \
-Dkubernetes.taskmanager.cpu=0.7 \
-Dkubernetes.jobmanager.memory.process.size=1024m \
-Dkubernetes.taskmanager.memory.process.size=2048m \
-Dtaskmanager.numberOfTaskSlots=2 \
-Dweb.cancel.enable=false \
-Dweb.submit.enable=false \
-Dkubernetes.rest-service.exposed.type=Nodeport \
-Dhigh-availability.type=kubernetes \
-Dkubernetes.container.security-context.read-only-root-filesystem=false \
-Dhigh-availability.storageDir=s3://flink-ha/flink_ha_qa \
-Drestart-strategy=fixed-delay \
-Drestart-strategy.fixed-delay.attempts=10 \
-Dcontainerized.master.env.rocksdb_checkpoint_interval=5 \
-Dcontainerized.taskmanager.env.rocksdb_checkpoint_interval=5 \
-Dkubernetes.artifacts.local-upload-enabled=false \
--jar s3://flink-qa-ha/flink-jars/loyalty-0.0.1-SNAPSHOT.jar
```
The goal is to start `filebeat` in the background within the TaskManager
containers and log its output to `/tmp/filebeat.log`. However:
* The `filebeat` process doesn't seem to run.
* No log file is created at `/tmp/filebeat.log`.
* When I manually run the same `filebeat` command inside the container using
`kubectl exec`, it works as expected and logs are sent to ELK.
It seems like the `kubernetes.taskmanager.entrypoint.args` is not being
applied or not executing correctly during deployment. Any help or suggestions
would be appreciated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]