Ying Ting Loo
10/13/2023, 10:08 AMprefect-kubernetes==0.3.1
I tried to get the manifest from prefect kubernetes manifest flow-run-job
edit the manifest to change the environment variables but when i try to apply it by kubectl apply -f job-manifest.yaml
I get the error
error: error when retrieving current configuration of:
Resource: "batch/v1, Resource=jobs", GroupVersionKind: "batch/v1, Kind=Job"
Name: "", Namespace: "data"
my manifest looks like this
apiVersion: batch/v1
kind: Job
metadata:
# labels are required, even if empty
labels: {}
namespace: data
stream_output: true
spec:
template:
spec:
completions: 1
containers:
- name: prefect-job
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: DB_PASSWORD
name: etl
image: xxxxx.dkr.ecr.eu-central-1.amazonaws.com/data/prefect_agent:latest
parallelism: 1
restartPolicy: Never
Ying Ting Loo
10/13/2023, 10:09 AMOlli Kavén
10/16/2023, 1:22 PMprefect work-pool get-default-base-job-template --type kubernetes > template.json
2. Edit the template
3. Update work-pool: prefect work-pool update --base-job-template template.json WORK_POOL_NAME
Olli Kavén
10/16/2023, 1:23 PMYing Ting Loo
10/16/2023, 1:23 PMOlli Kavén
10/16/2023, 1:28 PM