Dear All, We are using Flink with the following co...
# troubleshooting
x
Dear All, We are using Flink with the following command:
Copy code
./bin/kubernetes-session.sh -Dkubernetes.cluster-id=flink-cluster \
  -Dkubernetes.jobmanager.service-account=flink-service-account \
  -Dkubernetes.container.image=customimage/flink:latest \
  -Dkubernetes.container.image.pull-secrets=my-docker-hub-secret \
  -Dkubernetes.container.image.pull-policy=Always \
  -Dkubernetes.service.expose-rest=true \
  -Dkubernetes.rest-service.exposed.type=LoadBalancer
I have several questions: • What's happen if I have a new version of my custom image? Is it possible to have the jobmanager automatically updated ? • I generate my custom image with the following dockerfile:
Copy code
# Utilisez l'image Flink de base
 FROM flink:latest
 
RUN apt-get update && apt-get install -y curl jq
 
# Copiez le JAR dans le répertoire lib de Flink
 COPY TopSpeedWindowing.jar /opt/flink/usrlib/
 
# Copiez le script d'upload dans l'image
 COPY upload-jar.sh /opt/flink/upload-jar.sh
 
 
# Rendez le script exécutable
 RUN chmod +x /opt/flink/upload-jar.sh && ls -l
 
ENTRYPOINT ["/opt/flink/upload-jar.sh"]
Copy code
#!/bin/bash
# URL de l'API REST de Flink (ajustez selon votre configuration)
FLINK_REST_API="http://10.0.3.132:8081/"
 
# Chemin du fichier JAR à uploader
JAR_PATH="/opt/flink/usrlib/TopSpeedWindowing.jar"
 
echo "Waiting"
# Upload du JAR à Flink
curl -X POST -H "Expect:" -F "jarfile=@$JAR_PATH" "$FLINK_REST_API/jars/upload"
The script is not working as expected, how do upload the jar to the Flink? My goal is to create a new custom image flink and deployed it automatically on the K8S. Do you have any ideas? Xavier
g
The flink kubernetes operator is what you are looking for 🙂 https://github.com/apache/flink-kubernetes-operator