Skip to content

Commit dd5cb74

Browse files
authored
Update cannot-pull-image-from-acr-to-aks-cluster.md
Added scenario for pull QPS exceeded error
1 parent 921df29 commit dd5cb74

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

support/azure/azure-kubernetes/extensions/cannot-pull-image-from-acr-to-aks-cluster.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,39 @@ spec:
349349
nodeSelector:
350350
"kubernetes.io/os": linux
351351
```
352+
## Cause 6: Kubelet exceeded the default pull rate limit for image
353+
When multiple jobs require pulling same images it can exceed Kubelet default pull rate limit, see [registryPullQPS](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
354+
355+
> Failed to pull image "acrname.azurecr.io/repo/nginx:latest": **pull QPS exceeded**. This occurred for pod podname at 4/22/2025, 12:48:32.000 PM UTC.
356+
357+
### Solution:
358+
Change the [```imagePullPolicy```](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) from ```Always``` to ```IfNotPresent``` to prevent unnecessary pulls.
359+
360+
Here’s an example of how you can do this in your deployment YAML file:
361+
```yaml
362+
apiVersion: apps/v1
363+
kind: Deployment
364+
metadata:
365+
name: my-deployment
366+
spec:
367+
replicas: 3
368+
selector:
369+
matchLabels:
370+
app: my-app
371+
template:
372+
metadata:
373+
labels:
374+
app: my-app
375+
spec:
376+
containers:
377+
- name: my-container
378+
image: myacr.azurecr.io/my-image:latest
379+
imagePullPolicy: IfNotPresent
380+
```
381+
In this example:
382+
383+
The imagePullPolicy: IfNotPresent ensures that the image is pulled from registry only if it is not already present on the node
384+
352385
353386
## More information
354387

0 commit comments

Comments
 (0)