How to overcome the throttling issue of Docker while pulling images?

Sreelekshmi
2 min readJul 18, 2022

While working with docker, many of us might have come across the throttling issue while pulling an image or trying to create a pod using an image from docker.

Here I am going to explain a simple method to overcome the throttling issue caused by Docker.

To start with let me explain what actually is a throttling issue.

Problem Statement:

While creating a pod using an image from Docker Hub using the command:

kubectl run ngnix — image=nginx

and when tried to check the pods using kubectl get pods, I got the below error

NAME READY STATUS RESTARTS AGE

ngnix 0/1 ErrImagePull 0 4s

Analysis:

I tried to analyse the pod using the command

kubectl describe pod ngnix

and here is what I found:

Failed to pull image “nginx”: rpc error: code = Unknown desc = Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

This is called the throttling issue of Docker.

Solution

Don’t try to pull images from Docker Hub, instead try to use ECR(Elastic Container Registry) for private images and Amazon ECR Public Gallery for public docker images.

For example:

kubectl run ngnix — image=public.ecr.aws/breezeware/ngnix:latest

NAME READY STATUS RESTARTS AGE

ngnix 1/1 Running 0 22m

Hope you enjoyed reading. Thanks :)

--

--

Sreelekshmi

I am a Software Developer working in Cloud Native Technologies.