<@ULVA73B9P> how can I make flow run name and pod ...
# ask-marvin
o
@Marvin how can I make flow run name and pod name match?
m
To make the flow run name and the Kubernetes pod name match, you should configure the pod's metadata in the KubernetesRun run_config to align with the flow run name. You can use dynamic values to match the metadata or set a fixed pattern that includes identifiers from the flow run. Here are the key concepts to focus on: 1. When defining your flow, you can provide a
flow_run_name
parameter that accepts either a fixed string pattern or a function that generates the run name dynamically. 2. For Kubernetes, while deploying the flow, you might want to look into customizing the pod spec to insert the desired flow run name into the pod's metadata. The documentation doesn't provide a direct code snippet detailing how to make the pod name match the flow run name automatically, but the above excerpt shows how to dynamically set the flow run name. You may have to extend this concept by customizing your Kubernetes deployment YAML to use similar dynamic naming based on flow run parameters. For more detailed guidelines and examples on Kubernetes deployment and setting flow run names, you can explore the Prefect documentation for Kubernetes deployment and documentation on defining flows. If you need to delve deeper into this matter, consider searching for specific GitHub issues or asking the community for patterns they might have used to synchronize pod names with flow run names.