- Newest
- Most votes
- Most comments
The issue you're experiencing with your EKS pod failing to pull the image from Docker Hub after a manual trigger in your Bitbucket pipeline could be due to a few reasons:
-
Image Pull Secrets: When there's a delay between pushing the image and deploying it, the image pull secrets in your cluster might become outdated or invalid. Ensure that your image pull secrets are correctly configured and up-to-date in your EKS cluster.
-
Network Connectivity: The Windows node group might have temporary network connectivity issues when trying to pull the image from Docker Hub. This could be due to transient network problems or firewall rules.
-
Docker Hub Rate Limits: If you're using a free Docker Hub account, you might be hitting rate limits, especially if there's a significant delay between pushing the image and deploying it.
-
Image Availability: There might be a delay in the image becoming available on Docker Hub after it's pushed, especially if it's a large image.
To prevent this issue from happening again, you can try the following:
-
Use ECR instead of Docker Hub: Amazon Elastic Container Registry (ECR) is more tightly integrated with EKS and might provide more reliable image pulls.
-
Implement image pull retries: Configure your pod specification to retry image pulls a few times before failing.
-
Verify image pull secrets: Ensure your image pull secrets are correctly configured and not expiring.
-
Check network connectivity: Ensure your Windows nodes have consistent network access to Docker Hub.
-
Consider using a paid Docker Hub account: This can help avoid rate limiting issues.
-
Implement a health check in your pipeline: Before triggering the deployment, add a step to verify that the image is available and can be pulled successfully.
-
Use image digest instead of tags: This ensures you're pulling the exact image you pushed, even if there's a delay in deployment.
By implementing these measures, you should be able to improve the reliability of your image pulls and reduce the likelihood of deployment failures after manual triggers.
Sources
EKS creating pod stuck at pulling image | AWS re:Post
Tutorial: Getting started with AWS Batch on Amazon EKS Private Clusters - AWS Batch
Relevant content
- AWS OFFICIALUpdated 2 years ago
