https://prefect.io logo
s

Sam Garvis

08/29/2022, 7:27 PM
When I run this
prefect deployment build name.name -n name_dev -t dev_wq_k8s -sb gcs/dev --work-queue=dev_wq_k8s -ib kubernetes-job/dev-k8s-job
I get this error
Job is missing required attributes at the following paths: /apiVersion, /kind, /metadata, /spec (type=value_error)
Even though in the Prefect 2.0 UI for creating a k8s job block, it says
Job (Optional)
1
👀 1
George helped me out with this one.
Copy code
{
  "apiVersion": "batch/v1",
  "kind": "Job",
  "metadata": {
    "labels": {}
  },
  "spec": {
    "template": {
      "spec": {
        "parallelism": 1,
        "completions": 1,
        "restartPolicy": "Never",
        "containers": [
          {
            "name": "prefect-job",
            "env": []
          }
        ]
      }
    }
  }
}
paste this in job then for Command type
python
and click enter type
-m
and click enter type
prefect.engine
and click enter Should look like below
And you might have to put empty jsons '{}' in the other one's. Not sure
4 Views