<@ULVA73B9P> base-job-template not updating from f...
# ask-marvin
d
@Marvin base-job-template not updating from file in kubernetes worker after manual changes in the UI
m
Updating the base job template for a Kubernetes worker after making manual changes in the UI can involve a few steps. In the Prefect documentation, it suggests using a command to update a work pool's base job template to the contents of a file named `base-job-template.json`:
Copy code
bash
prefect work-pool update --base-job-template base-job-template.json my-work-pool
When you manually update the base job template through the Prefect UI, that change might not be automatically reflected in your Kubernetes configuration. It is important to synchronize your changes from the UI back to your Kubernetes files or infrastructure as code. Advanced customization of the base job template is possible for Kubernetes workers by editing work pools in the UI under the 'Advanced' tab, or by using the CLI as shown above. Always ensure that your
kubectl
command-line tool is available and properly configured, as it's required for operations involving Kubernetes. For more details, you can refer to the Prefect documentation on work pools and Kubernetes infrastructure: - Work Pools - Infrastructure
d
@Marvin jobs not being deleted after completion even after setting ttlSecondsAfterFinished
m
It appears there aren't directly related documents or open Github issues that address the problem of Kubernetes jobs not being deleted after completion, despite setting
ttlSecondsAfterFinished
. However, troubleshooting this issue typically involves the following steps: 1. Verify that the
ttlSecondsAfterFinished
field is correctly set in your job specification. 2. Ensure that the Kubernetes version you're using supports this feature (it's available since Kubernetes v1.12). 3. Check for any errors or events related to the job using
kubectl describe job <job-name>
and
kubectl get events
. 4. Ensure that the Kubernetes cluster roles and service accounts have appropriate permissions to delete jobs. 5. Make sure there's no configuration overriding or ignoring the
ttlSecondsAfterFinished
field within your deployment configuration or workflow controller. If you continue to experience issues, you may want to check the Kubernetes documentation or reach out to the Kubernetes community for further assistance. Additionally, you can manually clean up completed jobs using
kubectl delete job <job-name>
. For any Prefect-specific configuration or cleanup, refer to the Prefect Deployment Guide or Prefect Infrastructure Concepts. If the problem persists, consider filing an issue with the Prefect GitHub repository for further investigation.