Parash
07/05/2024, 2:00 PMjob_variables:
image: soaapreg.azurecr.io/sentinel-flow
imagePullSecrets:
- name: acr-secret
Worker 'KubernetesWorker a59877db-07ff-4ba4-abe2-36c607de7349' submitting flow run 'fb8f9a8f-415b-4d46-b447-393e335479de'
12:06:16 PM
prefect.flow_runs.worker
INFO
Creating Kubernetes job...
12:06:16 PM
prefect.flow_runs.worker
INFO
Completed submission of flow run 'fb8f9a8f-415b-4d46-b447-393e335479de'
12:06:17 PM
prefect.flow_runs.worker
INFO
Job 'psi3-edasich-x-z58jm': Pod has status 'Pending'.
12:06:17 PM
prefect.flow_runs.worker
ERROR
Job 'psi3-edasich-x-z58jm': Pod never started.
12:07:17 PM
prefect.flow_runs.worker
INFO
Job event 'SuccessfulCreate' at 2024-07-05 12:06:17+00:00: Created pod: psi3-edasich-x-z58jm-68rkt
12:07:17 PM
prefect.flow_runs.worker
INFO
Pod event 'Scheduled' at 2024-07-05 12:06:17.100731+00:00: Successfully assigned default/psi3-edasich-x-z58jm-68rkt to aks-soaap1z3514a-11953152-vmss000001
12:07:17 PM
prefect.flow_runs.worker
INFO
Pod event 'Pulling' (3 times) at 2024-07-05 12:06:57+00:00: Pulling image "soaapreg.azurecr.io/sentinel-flow:latest"
12:07:17 PM
prefect.flow_runs.worker
INFO
Pod event 'Failed' (3 times) at 2024-07-05 12:06:57+00:00: Failed to pull image "soaapreg.azurecr.io/sentinel-flow:latest": failed to pull and unpack image "soaapreg.azurecr.io/sentinel-flow:latest": failed to resolve reference "soaapreg.azurecr.io/sentinel-flow:latest": failed to authorize: failed to fetch anonymous token: unexpected status from GET request to <https://soaapreg.azurecr.io/oauth2/token?scope=repository%3Asentinel-flow%3Apull&service=soaapreg.azurecr.io>: 401 Unauthorized
12:07:17 PM
prefect.flow_runs.worker
INFO
Pod event 'Failed' (3 times) at 2024-07-05 12:06:57+00:00: Error: ErrImagePull
12:07:17 PM
prefect.flow_runs.worker
INFO
Pod event 'BackOff' (3 times) at 2024-07-05 12:07:11+00:00: Back-off pulling image "soaapreg.azurecr.io/sentinel-flow:latest"
12:07:17 PM
prefect.flow_runs.worker
INFO
Pod event 'Failed' (3 times) at 2024-07-05 12:07:11+00:00: Error: ImagePullBackOff
12:07:17 PM
prefect.flow_runs.worker
INFO
Reported flow run 'fb8f9a8f-415b-4d46-b447-393e335479de' as crashed: Flow run infrastructure exited with non-zero status code -1.
Taylor Curran
07/05/2024, 7:05 PM401 Unauthorized
error suggests that the credentials for accessing the ACR are either wrong or not being applied correctly.
Make sure the image pull secret (acr-secret
) is properly created and referenced in your Kubernetes job. Check the secret with:
kubectl get secret acr-secret -o yaml
Also you can double check that the prefect-server
service account has the right permissions to use the image pull secret. You can bind the secret to the service account like this:
apiVersion: v1
kind: ServiceAccount
metadata:
name: prefect-server
namespace: default
secrets:
- name: acr-secret
Parash
07/08/2024, 9:51 AM