Hendrik
01/03/2024, 4:07 PMErrImagePull
followed by ImagePullBackOff
within the created job in k8s
When checking the events of the job using kubectl -n prefect get events | grep <job_name>
I can see that there is an issue with pulling the image from the registry.
8m19s Normal Scheduled pod/teal-harrier-n6h8b-w6dc6 Successfully assigned prefect/teal-harrier-n6h8b-w6dc6 to data-cx31-pool-workload-worker1
6m47s Normal Pulling pod/teal-harrier-n6h8b-w6dc6 Pulling image "<registry-url>"
6m46s Warning Failed pod/teal-harrier-n6h8b-w6dc6 Failed to pull image "<registry-url>": rpc error: code = Unknown desc = failed to pull and unpack image "<registry-url>": failed to resolve reference "<registry-url>": failed to authorize: failed to fetch anonymous token: unexpected status: 403 Forbidden
6m46s Warning Failed pod/teal-harrier-n6h8b-w6dc6 Error: ErrImagePull
3m19s Normal BackOff pod/teal-harrier-n6h8b-w6dc6 Back-off pulling image "<registry-url>"
6m35s Warning Failed pod/teal-harrier-n6h8b-w6dc6 Error: ImagePullBackOff
8m20s Normal SuccessfulCreate job/teal-harrier-n6h8b Created pod: teal-harrier-n6h8b-w6dc6
I know these error messages from other projects and this is somewhat telling me that the flow canβt pull the image from my private registry. Is there any particular place I need to configure a pullSecret so that my job can actually pull the image it is supposed to run? Any hints are appreciated πKevin Grismore
01/03/2024, 4:13 PM"imagePullSecrets":
and whatever you need to provide to it to the inner spec
Hendrik
01/03/2024, 4:20 PMHendrik
01/03/2024, 4:21 PMKevin Grismore
01/03/2024, 4:22 PMHendrik
01/03/2024, 4:38 PMJob in version \"v1\" cannot be handled as a Job: json: cannot unmarshal object into Go struct field PodSpec.spec.template.spec.imagePullSecrets of type []v1.LocalObjectReference
This question here made me think that syntax might be wrong even though i double checked that the json is valid https://stackoverflow.com/questions/54221964/kubernetes-job-in-version-v1-cannot-be-handled-as-a-jobKevin Grismore
01/03/2024, 4:46 PMKevin Grismore
01/03/2024, 4:47 PM"imagePullSecrets": [
{ "name": "gitlab-token-auth" }
]
Hendrik
01/03/2024, 5:54 PM