Keep running into "exceeded its progress dead line" despite changing progressDeadlineSeconds
Error from server (BadRequest): container "client" in pod "client-deployment-5688bdc69c-hxlcf" is waiting to start: trying and failing to pull image
Based on my experience, this is more relative with imagePullSecrets
and the Kubernetes namespace
.
In your Create imagePullSecret
and Deploy to Kubernetes cluster
task, I saw that you did not provide the value to task parameter: namespace
. This will lead to a new namespace which name is default
will be created, since you unspecified the namespace.
And, the kubernetes secret which generated by createSecret
action is seperated for each namespace. In one word, different namespace has different secret value:
Secrets are stored within a given namespace and can only be accessed by pods within the same namespace.
Now, let’s back to your build compile process.
In your yml definition, Create imagePullSecret
will create a secret
for new namespace default
which created by task automatically as you did not provide the given namespace value.
Then, in next task Deploy to Kubernetes cluster
, because of the same reason, here the task will re-created a another new namespace default
(Note: this is not same with the previous one). Also, you could see this progress from the log:
At this time, the secret
that generated from the previous task will not available for the current namespace. BUT, as you know, the ACR
is a private container registry which our system must verify whether the kubernetes secret
is available.
In addition, in your Deploy to Kubernetes cluster task, you were specifying the repository as $(imageRepository)
which does not same with the repository you push the image to $(imageRepository)-client
.
This can also be checked in your log:
That's why there's no available node in your kubernetes, and you failed to pull the image also.
To avoid the issue, please ensure you provide the namespace
value in KubernetesManifest@0
task.
- task: KubernetesManifest@0
displayName: Create imagePullSecret
inputs:
action: createSecret
secretName: $(imagePullSecret)
namespace: $(k8sNamespace)
dockerRegistryEndpoint: $(DRServiceConnection)
- task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster
inputs:
action: deploy
namespace: $(k8sNamespace)
manifests: |
$(System.ArtifactsDirectory)/manifests/deployment.yml
imagePullSecrets: |
$(imagePullSecret)
containers: |
$(containerRegistry)/$(imageRepository)-client:$(tag)
secret to imagePullSecrets of each namespace
I faced a similar issues even provided the namespace still get error "exceeded its progress deadline Waiting for deployment "XX-service" rollout to finish: 0 of 1 updated replicas are available..."
due to fail to pull image
Adding "imagePullPolicy: Always" in .yaml fixed my rollout pull issues