<@ULVA73B9P> Can I name kubernetes job for a flow ...
# ask-marvin
v
@Marvin Can I name kubernetes job for a flow the same way as deployment name? How should I pass it through base-job-template?
m
thought for 61.7 seconds
You can create or update a work pool with a custom base job template using the CLI:
Copy code
bash
prefect work-pool create "my-k8s-pool" \
    --type kubernetes \
    --base-job-template path/to/template.json
Or update an existing work pool:
Copy code
bash
prefect work-pool create "existing-pool" \
    --base-job-template path/to/template.json \
    --overwrite
A few important notes: 1. Adding the flow run ID (as shown in the example:
{{ deployment_name }}-{{ flow_run_id }}
) is recommended to ensure unique job names for each run 2. Make sure the name follows Kubernetes naming conventions (lowercase alphanumeric characters, '-' and '.') 3. The template variables are automatically populated by Prefect when the job is created Would you like me to provide more details about other template variables you can use or about other aspects of the base job template configuration?